diff options
Diffstat (limited to 'services/surfaceflinger/EventThread.h')
-rw-r--r-- | services/surfaceflinger/EventThread.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/services/surfaceflinger/EventThread.h b/services/surfaceflinger/EventThread.h index b42cab6..a71d985 100644 --- a/services/surfaceflinger/EventThread.h +++ b/services/surfaceflinger/EventThread.h @@ -27,19 +27,18 @@ #include <utils/threads.h> #include <utils/SortedVector.h> -#include "DisplayHardware/DisplayHardware.h" +#include "DisplayHardware/PowerHAL.h" // --------------------------------------------------------------------------- - namespace android { - // --------------------------------------------------------------------------- class SurfaceFlinger; +class String8; // --------------------------------------------------------------------------- -class EventThread : public Thread, public DisplayHardware::VSyncHandler { +class EventThread : public Thread { class Connection : public BnDisplayEventConnection { public: Connection(const sp<EventThread>& eventThread); @@ -78,13 +77,15 @@ public: // called after the screen is turned on from main thread void onScreenAcquired(); + // called when receiving a vsync event + void onVSyncReceived(int display, nsecs_t timestamp); + void dump(String8& result, char* buffer, size_t SIZE) const; private: virtual bool threadLoop(); virtual status_t readyToRun(); virtual void onFirstRef(); - virtual void onVSyncReceived(int, nsecs_t timestamp); void removeDisplayEventConnection(const wp<Connection>& connection); void enableVSyncLocked(); @@ -92,7 +93,7 @@ private: // constants sp<SurfaceFlinger> mFlinger; - DisplayHardware& mHw; + PowerHAL mPowerHAL; mutable Mutex mLock; mutable Condition mCondition; |