Bug 1469746 - Rebuild display lists in full when we start/stop computing visibility for plugins. r=miko, a=RyanVM
authorMatt Woodrow <mwoodrow@mozilla.com>
Wed, 20 Jun 2018 14:24:46 +1200
changeset 473782 61ce1b424ccca62c4269c46006d115f2aeb082bc
parent 473781 5afdaceeb96a3b80edeed5cff5ef917716f90b9d
child 473783 785d242a5b01d5f1094882aa2144d8e5e2791e06
push id1732
push userjcristau@mozilla.com
push dateThu, 21 Jun 2018 12:56:25 +0000
treeherdermozilla-release@785d242a5b01 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmiko, RyanVM
bugs1469746
milestone61.0
Bug 1469746 - Rebuild display lists in full when we start/stop computing visibility for plugins. r=miko, a=RyanVM MozReview-Commit-ID: 3xHoYBBA4Fy
layout/base/nsLayoutUtils.cpp
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -3590,16 +3590,20 @@ nsLayoutUtils::PaintFrame(gfxContext* aR
   }
 
   // If the root has embedded plugins, flag the builder so we know we'll need
   // to update plugin geometry after painting.
   if ((aFlags & PaintFrameFlags::PAINT_WIDGET_LAYERS) &&
       !(aFlags & PaintFrameFlags::PAINT_DOCUMENT_RELATIVE) &&
       rootPresContext->NeedToComputePluginGeometryUpdates()) {
     builder.SetWillComputePluginGeometry(true);
+
+    // Disable partial updates for this paint as the list we're about to
+    // build has plugin-specific differences that won't trigger invalidations.
+    builder.SetDisablePartialUpdates(true);
   }
 
   nsRect canvasArea(nsPoint(0, 0), aFrame->GetSize());
   bool ignoreViewportScrolling =
     aFrame->GetParent() ? false : presShell->IgnoringViewportScrolling();
   if (ignoreViewportScrolling && rootScrollFrame) {
     nsIScrollableFrame* rootScrollableFrame =
       presShell->GetRootScrollFrameAsScrollable();
@@ -3940,16 +3944,20 @@ nsLayoutUtils::PaintFrame(gfxContext* aR
     }
 
     // We told the compositor thread not to composite when it received the
     // transaction because we wanted to update plugins first. Schedule the
     // composite now.
     if (layerManager) {
       layerManager->ScheduleComposite();
     }
+
+    // Disable partial updates for the following paint as well, as we now have
+    // a plugin-specific display list.
+    builder.SetDisablePartialUpdates(true);
   }
 
   builder.Check();
 
   {
     AUTO_PROFILER_TRACING("Paint", "DisplayListResources");
 
     // Flush the list so we don't trigger the IsEmpty-on-destruction assertion