SurfaceFlinger: send VSYNC power hints to IPowerManager
VSYNC power hints are now sent via binder to IPowerManager.
SurfaceFlinger no longer loads a second copy of the PowerHAL.
VSYNC power hints are sent in batches and not on per frame basis.
Change-Id: Ia5a839ab3c857cffae7089f810b4315d4ed23fcf
diff --git a/services/surfaceflinger/EventThread.h b/services/surfaceflinger/EventThread.h
index f6ab4a7..d1c4fcd 100644
--- a/services/surfaceflinger/EventThread.h
+++ b/services/surfaceflinger/EventThread.h
@@ -97,6 +97,7 @@
DisplayEventReceiver::Event* event);
void dump(String8& result) const;
+ void sendVsyncHintOff();
private:
virtual bool threadLoop();
@@ -107,6 +108,7 @@
void removeDisplayEventConnection(const wp<Connection>& connection);
void enableVSyncLocked();
void disableVSyncLocked();
+ void sendVsyncHintOnLocked();
// constants
sp<VSyncSource> mVSyncSource;
@@ -124,6 +126,9 @@
// for debugging
bool mDebugVsyncEnabled;
+
+ bool mVsyncHintSent;
+ timer_t mTimerId;
};
// ---------------------------------------------------------------------------