Don't run MarkNeedsDisplayItemRebuild when we're not retaining
authorMatt Woodrow <mwoodrow@mozilla.com>
Tue, 26 Sep 2017 16:27:49 +1300
changeset 685657 fb5c244ddf0dbfc1da103676d1018839ade51f77
parent 685656 812dd323181fd1086b91edfb9a6cc5360aa98f29
child 685658 8960cfc33561a9c4f78dd2426676747c9826adef
push id86010
push userbmo:ethlin@mozilla.com
push dateWed, 25 Oct 2017 00:44:42 +0000
milestone58.0a1
Don't run MarkNeedsDisplayItemRebuild when we're not retaining
layout/generic/nsFrame.cpp
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -962,17 +962,18 @@ nsIFrame::RemoveDisplayItemDataForDeleti
     }
     delete items;
   }
 }
 
 void
 nsIFrame::MarkNeedsDisplayItemRebuild()
 {
-  if (!XRE_IsContentProcess() || IsFrameModified()) {
+  if (!gfxPrefs::LayoutRetainDisplayList() || !XRE_IsContentProcess() ||
+      IsFrameModified()) {
     // Skip non-content processes and frames that are already marked modified.
     return;
   }
 
   nsIFrame* displayRoot = nsLayoutUtils::GetDisplayRootFrame(this);
   MOZ_ASSERT(displayRoot);
 
   RetainedDisplayListBuilder* retainedBuilder =