diff options
author | Mathias Agopian <mathias@google.com> | 2012-01-24 16:39:14 -0800 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2012-01-30 15:21:23 -0800 |
commit | 8aedd4737d6ce8548d2fd5def65b1e1737283821 (patch) | |
tree | 263ab5aa922c97b30875b9e16dc89f1915691e1a /services/surfaceflinger/MessageQueue.h | |
parent | 54d89516ef816c73fdcfaf90d5d5c159e432c3a5 (diff) | |
download | frameworks_native-8aedd4737d6ce8548d2fd5def65b1e1737283821.zip frameworks_native-8aedd4737d6ce8548d2fd5def65b1e1737283821.tar.gz frameworks_native-8aedd4737d6ce8548d2fd5def65b1e1737283821.tar.bz2 |
SF now synchronizes to VSYNC
Change-Id: Ic5e4f2ea9927ce133eef9499c03161325e9d02c5
Diffstat (limited to 'services/surfaceflinger/MessageQueue.h')
-rw-r--r-- | services/surfaceflinger/MessageQueue.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/services/surfaceflinger/MessageQueue.h b/services/surfaceflinger/MessageQueue.h index 2317d81..5ea197d 100644 --- a/services/surfaceflinger/MessageQueue.h +++ b/services/surfaceflinger/MessageQueue.h @@ -25,10 +25,15 @@ #include <utils/Timers.h> #include <utils/Looper.h> +#include <gui/DisplayEventReceiver.h> + #include "Barrier.h" namespace android { +class IDisplayEventConnection; +class EventThread; + // --------------------------------------------------------------------------- class MessageBase : public MessageHandler @@ -55,11 +60,20 @@ private: class MessageQueue { sp<Looper> mLooper; - volatile int32_t mWorkPending; + sp<EventThread> mEventThread; + sp<IDisplayEventConnection> mEvents; + sp<BitTube> mEventTube; + int32_t mWorkPending; + + static int cb_eventReceiver(int fd, int events, void* data); + int eventReceiver(int fd, int events); + ssize_t getEvents(DisplayEventReceiver::Event* events, size_t count); + void scheduleWorkASAP(); public: MessageQueue(); ~MessageQueue(); + void setEventThread(const sp<EventThread>& events); void waitMessage(); status_t postMessage(const sp<MessageBase>& message, nsecs_t reltime=0); |