Bug 1262304 - Add a pref to dump display lists for the content process. r=BenWa
authorMatt Woodrow <mwoodrow@mozilla.com>
Wed, 06 Apr 2016 15:29:57 +1200
changeset 291856 cc6c0df12548c251921f7e94f577d7a77a080ad2
parent 291855 482a89ef31e86ca70581b8736a21e9c601f133c0
child 291857 1e5447cbadfaaa24b8cdde74e117b6e122584722
push idunknown
push userunknown
push dateunknown
Bug 1262304 - Add a pref to dump display lists for the content process. r=BenWa
--- a/gfx/thebes/gfxPrefs.h
+++ b/gfx/thebes/gfxPrefs.h
@@ -396,16 +396,17 @@ private:
   DECL_GFX_PREF(Live, "layout.css.scroll-behavior.damping-ratio", ScrollBehaviorDampingRatio, float, 1.0f);
   DECL_GFX_PREF(Live, "layout.css.scroll-behavior.enabled",    ScrollBehaviorEnabled, bool, false);
   DECL_GFX_PREF(Live, "layout.css.scroll-behavior.spring-constant", ScrollBehaviorSpringConstant, float, 250.0f);
   DECL_GFX_PREF(Live, "layout.css.scroll-snap.prediction-max-velocity", ScrollSnapPredictionMaxVelocity, int32_t, 2000);
   DECL_GFX_PREF(Live, "layout.css.scroll-snap.prediction-sensitivity", ScrollSnapPredictionSensitivity, float, 0.750f);
   DECL_GFX_PREF(Live, "layout.css.scroll-snap.proximity-threshold", ScrollSnapProximityThreshold, int32_t, 200);
   DECL_GFX_PREF(Once, "layout.css.touch_action.enabled",       TouchActionEnabled, bool, false);
   DECL_GFX_PREF(Live, "layout.display-list.dump",              LayoutDumpDisplayList, bool, false);
+  DECL_GFX_PREF(Live, "layout.display-list.dump-content",      LayoutDumpDisplayListContent, bool, false);
   DECL_GFX_PREF(Live, "layout.event-regions.enabled",          LayoutEventRegionsEnabledDoNotUseDirectly, bool, false);
   DECL_GFX_PREF(Once, "layout.frame_rate",                     LayoutFrameRate, int32_t, -1);
   DECL_GFX_PREF(Once, "layout.paint_rects_separately",         LayoutPaintRectsSeparately, bool, true);
   // This and code dependent on it should be removed once containerless scrolling looks stable.
   DECL_GFX_PREF(Once, "layout.scroll.root-frame-containers",   LayoutUseContainersForRootFrames, bool, true);
   // These affect how line scrolls from wheel events will be accelerated.
--- a/gfx/thebes/gfxUtils.cpp
+++ b/gfx/thebes/gfxUtils.cpp
@@ -1549,17 +1549,18 @@ gfxUtils::ThreadSafeGetFeatureStatus(con
     return runnable->GetNSResult();
   return gfxInfo->GetFeatureStatus(feature, status);
 /* static */ bool
 gfxUtils::DumpDisplayList() {
-  return gfxPrefs::LayoutDumpDisplayList();
+  return gfxPrefs::LayoutDumpDisplayList() ||
+         (gfxPrefs::LayoutDumpDisplayListContent() && XRE_IsContentProcess());
 FILE *gfxUtils::sDumpPaintFile = stderr;
 namespace mozilla {
 namespace gfx {
 Color ToDeviceColor(Color aColor)
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -2528,16 +2528,17 @@ pref("layout.interruptible-reflow.enable
 // pref to control browser frame rate, in Hz. A value <= 0 means choose
 // automatically based on knowledge of the platform (or 60Hz if no platform-
 // specific information is available).
 pref("layout.frame_rate", -1);
 // pref to dump the display list to the log. Useful for debugging drawing.
 pref("layout.display-list.dump", false);
+pref("layout.display-list.dump-content", false);
 // pref to control precision of the frame rate timer. When true,
 // we use a "precise" timer, which means each notification fires
 // Nms after the start of the last notification. That means if the
 // processing of the notification is slow, the timer can fire immediately
 // after we've just finished processing the last notification, which might
 // lead to starvation problems.
 // When false, we use a "slack" timer which fires Nms after the *end*