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 300de5b86a
commit c810dd4052

View File

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