X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/44433f650cd3e5f9f66253b74d194fcb01578595..8f01a41693ff4b01a224e9ea2f9a26538ec20414:/lib/gdi/grc.h diff --git a/lib/gdi/grc.h b/lib/gdi/grc.h index 57439178..82243483 100644 --- a/lib/gdi/grc.h +++ b/lib/gdi/grc.h @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -50,6 +51,10 @@ struct gOpcode flush, + waitVSync, + flip, + notify, + end,shutdown } opcode; @@ -128,15 +133,14 @@ struct gOpcode int rel; } *setOffset; } parm; - - int flags; }; /* gRC is the singleton which controls the fifo and dispatches commands */ -class gRC: public iObject +class gRC: public iObject, public Object { DECLARE_REF(gRC); private: + friend class gPainter; static gRC *instance; static void *thread_wrapper(void *ptr); @@ -144,6 +148,9 @@ private: void *thread(); queueRingBuffer queue; + + eFixedMessagePump m_notify_pump; + void recv_notify(const int &i); public: eLock queuelock; gRC(); @@ -164,6 +171,8 @@ public: } } + Signal0 notify; + static gRC *getInstance(); }; @@ -215,6 +224,7 @@ public: void blit(gPixmap *pixmap, ePoint pos, const eRect &what=eRect(), int flags=0); void setPalette(gRGB *colors, int start=0, int len=256); + void setPalette(gPixmap *source); void mergePalette(gPixmap *target); void line(ePoint start, ePoint end); @@ -228,6 +238,10 @@ public: void clippop(); void flush(); + + void waitVSync(); + void flip(); + void notify(); }; class gDC: public iObject