Bug 1458414 - Call DiscardCompositorAnimations() after BuildWebRenderCommands(). r?kats draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Wed, 02 May 2018 12:14:59 +0900
changeset 790322 01438b813e899f6c0f5ee93a5f0b4b860b8afd7d
parent 790321 258fa1eb49c9a559f0f75bd0a597d14398b01430
child 790323 dc6c472c69b6d94905bc0b19a140845802a79028
push id108498
push userhikezoe@mozilla.com
push dateWed, 02 May 2018 03:15:27 +0000
reviewerskats
bugs1458414, 1457448
milestone61.0a1
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) {