diff options
author | Vishal Bhoj <vishal.bhoj@linaro.org> | 2012-11-22 07:21:51 +0000 |
---|---|---|
committer | Amit Pundir <amit.pundir@linaro.org> | 2013-02-13 16:47:45 +0530 |
commit | 651ef90d43afa25653c7437da8c7a4af38b8b6aa (patch) | |
tree | 1bda0dd867f8d3e8d625c4cf0fc32a1eb8ce4331 | |
parent | 620b5975f6cb6a1bd4292b0f45eadb3a287b424a (diff) | |
download | native-linaro_android_4.2.2_critical_fixes_only.tar.gz |
surfaceflinger: Handle screen timeout on hw without vsynclinaro_android_4.2.2_critical_fixes_only
timeout currently at 1 second waiting for vsync. With
this change timeout happens at 16ms.
Change-Id: I785a2ff2bd15710c1b36466a298379adcf0ae936
Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
-rw-r--r-- | services/surfaceflinger/EventThread.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/services/surfaceflinger/EventThread.cpp b/services/surfaceflinger/EventThread.cpp index edb9fa5807..b56c3daada 100644 --- a/services/surfaceflinger/EventThread.cpp +++ b/services/surfaceflinger/EventThread.cpp @@ -20,6 +20,7 @@ #include <sys/types.h> #include <cutils/compiler.h> +#include <cutils/properties.h> #include <gui/BitTube.h> #include <gui/IDisplayEventConnection.h> @@ -41,6 +42,11 @@ EventThread::EventThread(const sp<SurfaceFlinger>& flinger) mUseSoftwareVSync(false), mDebugVsyncEnabled(false) { + char value[PROPERTY_VALUE_MAX]; + property_get("debug.sf.no_hw_vsync", value, "0"); + if (1 == atoi(value)) + mUseSoftwareVSync = true; + for (int32_t i=0 ; i<HWC_DISPLAY_TYPES_SUPPORTED ; i++) { mVSyncEvent[i].header.type = DisplayEventReceiver::DISPLAY_EVENT_VSYNC; mVSyncEvent[i].header.id = 0; @@ -108,6 +114,11 @@ void EventThread::onScreenAcquired() { mUseSoftwareVSync = false; mCondition.broadcast(); } + + char value[PROPERTY_VALUE_MAX]; + property_get("debug.sf.no_hw_vsync", value, "0"); + if (1 == atoi(value)) + mUseSoftwareVSync = true; } |