Bug 1148583 - Dispatch touch events before composites. r=kats
authorMason Chang <mchang@mozilla.com>
Mon, 30 Mar 2015 08:12:47 -0700
changeset 236509 6312bb5f0108f61afa4f4382c2b759718fc33f96
parent 236508 7ee219636f2213261d2390b99c3a05b36aee9ade
child 236510 68bd70d6421cb743e59d05d9afded660385877d1
push id28511
push userkwierso@gmail.com
push dateTue, 31 Mar 2015 02:34:53 +0000
treeherdermozilla-central@8af276ab8636 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1148583
milestone39.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1148583 - Dispatch touch events before composites. r=kats
gfx/layers/ipc/CompositorParent.cpp
--- a/gfx/layers/ipc/CompositorParent.cpp
+++ b/gfx/layers/ipc/CompositorParent.cpp
@@ -327,25 +327,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);
 }
 
 void
 CompositorVsyncObserver::OnForceComposeToTarget()
 {
   /**
    * bug 1138502 - There are cases such as during long-running window resizing events
    * where we receive many sync RecvFlushComposites. We also get vsync notifications which