diff options
author | Wang, Yue A <yue.a.wang@intel.com> | 2014-01-21 17:42:13 +0800 |
---|---|---|
committer | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2017-01-03 01:51:06 +0100 |
commit | c159da765bfeed47ca45ac0645d98de303b56def (patch) | |
tree | ef75fb8cce9d9d7cac2ed9655e7a9bcfdde647ee | |
parent | d3ad4f1e64dfe162c03fbbbe79c21c3c20641f18 (diff) | |
download | frameworks_native-c159da765bfeed47ca45ac0645d98de303b56def.zip frameworks_native-c159da765bfeed47ca45ac0645d98de303b56def.tar.gz frameworks_native-c159da765bfeed47ca45ac0645d98de303b56def.tar.bz2 |
SurfaceFlinger: disable VSync thread if no clients requiring.
In EventThread, 2 VSYNCs are needed to do composition and update
the client status. So, a 30FPS video may leads to 60FPS VSYNC,
which means the DispSync thread would be waked 60FPS. This is a
unexpected behavior which takes more power consumption. Now we
update the SF status soon after the first VSYNC, which means no
extra VSYNC needed, and the DispSync could be awaked as expected,
and consequently power get saved.
Change-Id: If486eb9b87f109a71f71b510768f15dd733f1233
Orig-Change-Id: I1d3b166021e15a81b2ad770b039761fc2c15fddf
Tracked-On: https://jira01.devtools.intel.com/browse/IMINAN-12211
Category: aosp improvement
Domain: Graphics-SF
Origin: internal
Upstream-Candidate: yes
Signed-off-by: Wang, Yue A <yue.a.wang@intel.com>
Reviewed-on: https://android.intel.com:443/238344
-rw-r--r-- | services/surfaceflinger/EventThread.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/services/surfaceflinger/EventThread.cpp b/services/surfaceflinger/EventThread.cpp index 973a8bc..c8cf4bf 100644 --- a/services/surfaceflinger/EventThread.cpp +++ b/services/surfaceflinger/EventThread.cpp @@ -283,11 +283,11 @@ Vector< sp<EventThread::Connection> > EventThread::waitForEvent( } // Here we figure out if we need to enable or disable vsyncs - if (timestamp && !waitForVSync) { - // we received a VSYNC but we have no clients - // don't report it, and disable VSYNC events + if (!waitForVSync) { + // we have no clients waiting on next VSYNC + // just disable VSYNC events. disableVSyncLocked(); - } else if (!timestamp && waitForVSync) { + } else if (!timestamp) { // we have at least one client, so we want vsync enabled // (TODO: this function is called right after we finish // notifying clients of a vsync, so this call will be made |