Bug 1148583 - Dispatch touch events before composites. r=kats, a=bajaj
authorMason Chang <mchang@mozilla.com>
Mon, 30 Mar 2015 19:46:00 -0400
changeset 238008 20b67213a0479d42acb1f530949d19d093895c13
parent 238007 ee218cbd5dd1e3637ff2311028e61c745c2fde34
child 238009 bd159d352edd2a1c19f8569e5f693df320a5ace1
push id428
push userryanvm@gmail.com
push dateWed, 01 Apr 2015 00:17:53 +0000
treeherdermozilla-b2g37_v2_2@20b67213a047 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats, bajaj
bugs1148583
milestone37.0
Bug 1148583 - Dispatch touch events before composites. r=kats, a=bajaj
gfx/layers/ipc/CompositorParent.cpp
--- a/gfx/layers/ipc/CompositorParent.cpp
+++ b/gfx/layers/ipc/CompositorParent.cpp
@@ -324,25 +324,25 @@ void
 CompositorVsyncObserver::Composite(TimeStamp aVsyncTimestamp)
 {
   MOZ_ASSERT(CompositorParent::IsInCompositorThread());
   {
     MonitorAutoLock lock(mCurrentCompositeTaskMonitor);
     mCurrentCompositeTask = nullptr;
   }
 
+  DispatchTouchEvents(aVsyncTimestamp);
+
   if (mNeedsComposite && mCompositorParent) {
     mNeedsComposite = false;
     mCompositorParent->CompositeCallback(aVsyncTimestamp);
     mVsyncNotificationsSkipped = 0;
   } else if (mVsyncNotificationsSkipped++ > gfxPrefs::CompositorUnobserveCount()) {
     UnobserveVsync();
   }
-
-  DispatchTouchEvents(aVsyncTimestamp);
 }
 
 bool
 CompositorVsyncObserver::NeedsComposite()
 {
   MOZ_ASSERT(CompositorParent::IsInCompositorThread());
   return mNeedsComposite;
 }