Bug 1128691. Part 2: Consolidate touch resampilng pref checks. r=kats

This commit is contained in:
Mason Chang 2015-02-04 13:08:40 -08:00
parent 75dbe45832
commit 40d73c2e10

View File

@ -122,7 +122,7 @@ GeckoTouchDispatcher::SetCompositorVsyncObserver(mozilla::layers::CompositorVsyn
MOZ_ASSERT(NS_IsMainThread());
// We assume on b2g that there is only 1 CompositorParent
MOZ_ASSERT(sTouchDispatcher->mCompositorVsyncObserver == nullptr);
if (gfxPrefs::TouchResampling()) {
if (sTouchDispatcher->mResamplingEnabled) {
sTouchDispatcher->mCompositorVsyncObserver = aObserver;
}
}
@ -131,7 +131,7 @@ GeckoTouchDispatcher::SetCompositorVsyncObserver(mozilla::layers::CompositorVsyn
/* static */ bool
GeckoTouchDispatcher::NotifyVsync(TimeStamp aVsyncTimestamp)
{
if ((sTouchDispatcher == nullptr) || !gfxPrefs::TouchResampling()) {
if (sTouchDispatcher == nullptr) {
return false;
}