summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/EventThread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'services/surfaceflinger/EventThread.cpp')
-rw-r--r--services/surfaceflinger/EventThread.cpp11
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;
}