mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Draw "OSM" as a view. ES 3.0: Tell tilers to discard depth/stencil of the backbuffer.
Also, don't even bind the UI texture unless there's UI to draw (probably negligible optimization).
This commit is contained in:
1 parent
4002cf6dac
commit
0cbff84489
4 files changed
+106
-74
No files matched your search
+20
-2
@@ -7,16 +7,25 @@
|
||||
#include "math/geom2d.h"
|
||||
#include "Common/StdMutex.h"
|
||||
|
||||
#include "ui/view.h"
|
||||
|
||||
class DrawBuffer;
|
||||
|
||||
class OnScreenMessages {
|
||||
public:
|
||||
void Show(const std::string &message, float duration_s = 1.0f, uint32_t color = 0xFFFFFF, int icon = -1, bool checkUnique = true);
|
||||
void ShowOnOff(const std::string &message, bool b, float duration_s = 1.0f, uint32_t color = 0xFFFFFF, int icon = -1);
|
||||
void Draw(DrawBuffer &draw, const Bounds &bounds);
|
||||
bool IsEmpty() const { return messages_.empty(); }
|
||||
|
||||
private:
|
||||
void Lock() {
|
||||
mutex_.lock();
|
||||
}
|
||||
void Unlock() {
|
||||
mutex_.unlock();
|
||||
}
|
||||
|
||||
void Clean();
|
||||
|
||||
struct Message {
|
||||
int icon;
|
||||
uint32_t color;
|
||||
@@ -24,9 +33,18 @@ private:
|
||||
double endTime;
|
||||
double duration;
|
||||
};
|
||||
const std::list<Message> &Messages() { return messages_; }
|
||||
|
||||
private:
|
||||
|
||||
std::list<Message> messages_;
|
||||
std::recursive_mutex mutex_;
|
||||
};
|
||||
|
||||
class OnScreenMessagesView : public UI::InertView {
|
||||
public:
|
||||
OnScreenMessagesView(UI::LayoutParams *layoutParams = nullptr) : UI::InertView(layoutParams) {}
|
||||
void Draw(UIContext &dc);
|
||||
};
|
||||
|
||||
extern OnScreenMessages osm;
|
||||
Reference in new issue
Block a user