Bug 1469746 - Rebuild display lists in full when we start/stop computing visibility for plugins. r?miko
MozReview-Commit-ID: 3xHoYBBA4Fy
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -3594,16 +3594,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();
@@ -3944,16 +3948,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