From 0608d80c6e4ab2a528ad827464d11b2dfd6bd9dd Mon Sep 17 00:00:00 2001 From: Mason Chang Date: Tue, 14 Apr 2015 10:31:58 -0400 Subject: [PATCH] Bug 1153395 - Disable Hardware Vsync on Non Kit-Kat devices. r=mwu --- widget/gonk/HwcComposer2D.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/widget/gonk/HwcComposer2D.cpp b/widget/gonk/HwcComposer2D.cpp index e9a1763505d8..ec885388bd47 100644 --- a/widget/gonk/HwcComposer2D.cpp +++ b/widget/gonk/HwcComposer2D.cpp @@ -220,7 +220,14 @@ HwcComposer2D::RegisterHwcEventCallback() // Disable Vsync first, and then register callback functions. device->eventControl(device, HWC_DISPLAY_PRIMARY, HWC_EVENT_VSYNC, false); device->registerProcs(device, &sHWCProcs); + +// Only support actual hardware vsync on kitkat due to innaccurate timings +// with JellyBean, and HwcComposer bugs with L. Reenable for L later +#if ANDROID_VERSION == 19 mHasHWVsync = gfxPrefs::HardwareVsyncEnabled(); +#else + mHasHWVsync = false; +#endif return mHasHWVsync; }