Bug 1505363 - Call DiscardCompositorAnimations() after calling WrBridge()->EndTransaction() r=kats
authorsotaro <sotaro.ikeda.g@gmail.com>
Tue, 08 Jan 2019 08:57:03 +0900
changeset 452853 ed51ef14289e378f05974012b62f1cb2464b867b
parent 452852 816dcd83b0c4677f417056766ee2b3223ff78822
child 452854 5259ce5b5a406ca59b08d42c88435c99e7352bdd
push id35331
push useropoprus@mozilla.com
push dateTue, 08 Jan 2019 10:16:13 +0000
treeherdermozilla-central@60aa2498320d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1505363
milestone66.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 1505363 - Call DiscardCompositorAnimations() after calling WrBridge()->EndTransaction() r=kats Discard animations after calling WrBridge()->EndTransaction(). It updates mWrEpoch in WebRenderBridgeParent. The updated mWrEpoch is necessary for deleting animations at the correct time. Differential Revision: https://phabricator.services.mozilla.com/D15799
gfx/layers/wr/WebRenderLayerManager.cpp
--- a/gfx/layers/wr/WebRenderLayerManager.cpp
+++ b/gfx/layers/wr/WebRenderLayerManager.cpp
@@ -293,18 +293,16 @@ void WebRenderLayerManager::EndTransacti
     aBackground->AddWebRenderCommands(builder);
     if (dumpEnabled) {
       printf_stderr("(no display list; background only)\n");
       builderDumpIndex =
           builder.Dump(/*indent*/ 1, Some(builderDumpIndex), Nothing());
     }
   }
 
-  DiscardCompositorAnimations();
-
   mWidget->AddWindowOverlayWebRenderCommands(WrBridge(), builder,
                                              resourceUpdates);
   mWindowOverlayChanged = false;
   if (dumpEnabled) {
     printf_stderr("(window overlay)\n");
     Unused << builder.Dump(/*indent*/ 1, Some(builderDumpIndex), Nothing());
   }
 
@@ -366,16 +364,21 @@ void WebRenderLayerManager::EndTransacti
     WrBridge()->EndTransaction(contentSize, dl, resourceUpdates,
                                size.ToUnknownSize(), mLatestTransactionId,
                                mScrollData, containsSVGGroup,
                                mTransactionIdAllocator->GetVsyncId(),
                                mTransactionIdAllocator->GetVsyncStart(),
                                refreshStart, mTransactionStart, mURL);
   }
 
+  // Discard animations after calling WrBridge()->EndTransaction().
+  // It updates mWrEpoch in WebRenderBridgeParent. The updated mWrEpoch is
+  // necessary for deleting animations at the correct time.
+  DiscardCompositorAnimations();
+
   mTransactionStart = TimeStamp();
 
   MakeSnapshotIfRequired(size);
   mNeedsComposite = false;
 }
 
 void WebRenderLayerManager::SetFocusTarget(const FocusTarget& aFocusTarget) {
   mFocusTarget = aFocusTarget;