Bug 1298254 - Ensure that the flush-apz-repaints codepath also waits for pending SetTargetAPZCNotification messages on the controller thread before returning. r=dvander a=test-only
authorKartikaya Gupta <kgupta@mozilla.com>
Fri, 23 Sep 2016 17:14:00 -0400
changeset 355776 6dd548d6b45aa8aed064d185d1a92d8944cdef5c
parent 355775 828f4175481c030e8f39632f9623105745966411
child 355777 ffb4d42e6f5d5bd3db8421d397235775552b51d8
push id6570
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:26:13 +0000
treeherdermozilla-beta@f455459b2ae5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander, test-only
bugs1298254
milestone51.0a2
Bug 1298254 - Ensure that the flush-apz-repaints codepath also waits for pending SetTargetAPZCNotification messages on the controller thread before returning. r=dvander a=test-only MozReview-Commit-ID: 5bY3TeJB4KN
gfx/layers/ipc/CompositorBridgeParent.cpp
--- a/gfx/layers/ipc/CompositorBridgeParent.cpp
+++ b/gfx/layers/ipc/CompositorBridgeParent.cpp
@@ -1655,17 +1655,19 @@ CompositorBridgeParent::FlushApzRepaints
 {
   MOZ_ASSERT(mApzcTreeManager);
   uint64_t layersId = aLayerTree->GetId();
   if (layersId == 0) {
     // The request is coming from the parent-process layer tree, so we should
     // use the compositor's root layer tree id.
     layersId = mRootLayerTreeID;
   }
-  mApzcTreeManager->FlushApzRepaints(layersId);
+  APZThreadUtils::RunOnControllerThread(NS_NewRunnableFunction([=] () {
+    mApzcTreeManager->FlushApzRepaints(layersId);
+  }));
 }
 
 void
 CompositorBridgeParent::GetAPZTestData(const LayerTransactionParent* aLayerTree,
                                        APZTestData* aOutData)
 {
   MonitorAutoLock lock(*sIndirectLayerTreesLock);
   *aOutData = sIndirectLayerTrees[mRootLayerTreeID].mApzTestData;