Flush any buffer operations that may be running after EndEmptyTransaction before EndTransaction (bug 1416308, r=dvander)
authorRyan Hunt <rhunt@eqrion.net>
Fri, 10 Nov 2017 13:12:15 -0500
changeset 444651 dcb005c6e64be8d53898a4a98f3610691ed676ca
parent 444650 20d4af5881a14ca34bec7fb869b7f161419bc856
child 444652 1c6cf35925b7b17064864f115dc60ee4912aed19
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander
bugs1416308
milestone58.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
Flush any buffer operations that may be running after EndEmptyTransaction before EndTransaction (bug 1416308, r=dvander) MozReview-Commit-ID: CpdtwW2JNip
gfx/layers/client/ClientLayerManager.cpp
--- a/gfx/layers/client/ClientLayerManager.cpp
+++ b/gfx/layers/client/ClientLayerManager.cpp
@@ -431,16 +431,22 @@ ClientLayerManager::EndTransaction(DrawP
                                    void* aCallbackData,
                                    EndTransactionFlags aFlags)
 {
   if (!mForwarder->IPCOpen()) {
     mInTransaction = false;
     return;
   }
 
+  if (mTransactionIncomplete) {
+    // If the previous transaction was incomplete then we may have buffer operations
+    // running on the paint thread that haven't finished yet
+    GetCompositorBridgeChild()->FlushAsyncPaints();
+  }
+
   if (mWidget) {
     mWidget->PrepareWindowEffects();
   }
   EndTransactionInternal(aCallback, aCallbackData, aFlags);
   ForwardTransaction(!(aFlags & END_NO_REMOTE_COMPOSITE));
 
   if (mRepeatTransaction) {
     mRepeatTransaction = false;