Bug 1071704 - HWC hooks registration should not depend on H/W Vsync. r=sotaro

This commit is contained in:
Sushil Chauhan 2014-09-23 11:14:39 -07:00
parent fc9cada26d
commit f1643bf8db

View File

@ -196,10 +196,6 @@ HwcComposer2D::EnableVsync(bool aEnable)
bool
HwcComposer2D::RegisterHwcEventCallback()
{
if (!gfxPrefs::FrameUniformityHWVsyncEnabled()) {
return false;
}
HwcDevice* device = (HwcDevice*)GetGonkDisplay()->GetHWCDevice();
if (!device || !device->registerProcs) {
LOGE("Failed to get hwc");
@ -209,9 +205,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);
mHasHWVsync = true;
return true;
if (!gfxPrefs::FrameUniformityHWVsyncEnabled()) {
device->eventControl(device, HWC_DISPLAY_PRIMARY, HWC_EVENT_VSYNC, false);
mHasHWVsync = false;
}
return mHasHWVsync;
}
void