Bug 1458414 - Call DiscardCompositorAnimations() after BuildWebRenderCommands(). r=kats
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Wed, 02 May 2018 12:14:59 +0900
changeset 472791 b2cbfb9dd35eae211e4a874dc5068cf7df97cf1b
parent 472790 a6b22dcb5b8019d4ecb244ba2304ef3dda560f06
child 472792 af61a9b83a656716510eae964d10bf2153ff90eb
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1458414, 1457448
milestone61.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 1458414 - Call DiscardCompositorAnimations() after BuildWebRenderCommands(). r=kats Since bug 1457448 we can clear discarded animations on the same transaction where we send animations to the compositor. MozReview-Commit-ID: 4BYsCgA98S0
gfx/layers/wr/WebRenderLayerManager.cpp
--- a/gfx/layers/wr/WebRenderLayerManager.cpp
+++ b/gfx/layers/wr/WebRenderLayerManager.cpp
@@ -259,31 +259,32 @@ WebRenderLayerManager::EndTransactionWit
 #ifdef XP_WIN
   gfxDWriteFont::UpdateClearTypeUsage();
 #endif
 
   // Since we don't do repeat transactions right now, just set the time
   mAnimationReadyTime = TimeStamp::Now();
 
   WrBridge()->BeginTransaction();
-  DiscardCompositorAnimations();
 
   LayoutDeviceIntSize size = mWidget->GetClientSize();
   wr::LayoutSize contentSize { (float)size.width, (float)size.height };
   wr::DisplayListBuilder builder(WrBridge()->GetPipeline(), contentSize, mLastDisplayListSize);
   wr::IpcResourceUpdateQueue resourceUpdates(WrBridge());
 
   mWebRenderCommandBuilder.BuildWebRenderCommands(builder,
                                                   resourceUpdates,
                                                   aDisplayList,
                                                   aDisplayListBuilder,
                                                   mScrollData,
                                                   contentSize,
                                                   aFilters);
 
+  DiscardCompositorAnimations();
+
   mWidget->AddWindowOverlayWebRenderCommands(WrBridge(), builder, resourceUpdates);
   mWindowOverlayChanged = false;
 
   if (AsyncPanZoomEnabled()) {
     mScrollData.SetFocusTarget(mFocusTarget);
     mFocusTarget = FocusTarget();
 
     if (mIsFirstPaint) {