split HWComposer out of DisplayHardware
we will only ever have a single instance of HWComposer, so
it's now an attribute of SurfaceFlinger, instead of being part
of DisplayHardware.
DisplayHardware now just represents a "display" (it should be renamed).
Change-Id: Iec191e57686868e1df6daa8b880a286c9fefde56
diff --git a/services/surfaceflinger/EventThread.h b/services/surfaceflinger/EventThread.h
index 92c92de..2f10cdb 100644
--- a/services/surfaceflinger/EventThread.h
+++ b/services/surfaceflinger/EventThread.h
@@ -28,6 +28,7 @@
#include <utils/SortedVector.h>
#include "DisplayHardware.h"
+#include "DisplayHardware/PowerHAL.h"
// ---------------------------------------------------------------------------
namespace android {
@@ -38,7 +39,7 @@
// ---------------------------------------------------------------------------
-class EventThread : public Thread, public DisplayHardware::VSyncHandler {
+class EventThread : public Thread {
class Connection : public BnDisplayEventConnection {
public:
Connection(const sp<EventThread>& eventThread);
@@ -77,20 +78,23 @@
// 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();
void disableVSyncLocked();
// constants
- DisplayHardware& mHw;
+ sp<SurfaceFlinger> mFlinger;
+ PowerHAL mPowerHAL;
mutable Mutex mLock;
mutable Condition mCondition;