Bug 637852. Part 12: Dump layer trees and display lists to stdout instead of stderr so that they stay in order with window.dump() and other output. r=tnikkel
authorRobert O'Callahan <robert@ocallahan.org>
Thu, 23 Jun 2011 00:11:28 +1200
changeset 71527 e552be420a02acc127554b582f7f6c062418965c
parent 71526 a63a96b9571e572d0f0ca4272f6c48a9cb3a35c6
child 71528 2c7a42271f31aba0507fbec85a6622dba44f45a3
push id20559
push usereakhgari@mozilla.com
push dateWed, 22 Jun 2011 19:51:00 +0000
treeherdermozilla-central@cd95d565c4d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstnikkel
bugs637852
milestone7.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 637852. Part 12: Dump layer trees and display lists to stdout instead of stderr so that they stay in order with window.dump() and other output. r=tnikkel
layout/base/FrameLayerBuilder.cpp
layout/base/nsLayoutDebugger.cpp
layout/base/nsLayoutUtils.cpp
--- a/layout/base/FrameLayerBuilder.cpp
+++ b/layout/base/FrameLayerBuilder.cpp
@@ -2096,17 +2096,17 @@ FrameLayerBuilder::CheckDOMModified()
   return PR_TRUE;
 }
 
 #ifdef DEBUG
 void
 FrameLayerBuilder::DumpRetainedLayerTree()
 {
   if (mRetainingManager) {
-    mRetainingManager->Dump(stderr);
+    mRetainingManager->Dump(stdout);
   }
 }
 #endif
 
 FrameLayerBuilder::Clip::Clip(const Clip& aOther, nsDisplayItem* aClipItem)
   : mRoundedClipRects(aOther.mRoundedClipRects),
     mHaveClipRect(PR_TRUE)
 {
--- a/layout/base/nsLayoutDebugger.cpp
+++ b/layout/base/nsLayoutDebugger.cpp
@@ -208,12 +208,12 @@ PrintDisplayListTo(nsDisplayListBuilder*
     }
   }
 }
 
 void
 nsFrame::PrintDisplayList(nsDisplayListBuilder* aBuilder,
                           const nsDisplayList& aList)
 {
-  PrintDisplayListTo(aBuilder, aList, 0, stderr);
+  PrintDisplayListTo(aBuilder, aList, 0, stdout);
 }
 
 #endif
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -1287,17 +1287,17 @@ nsLayoutUtils::GetFramesForArea(nsIFrame
   nsresult rv =
     aFrame->BuildDisplayListForStackingContext(&builder, target, &list);
 
   builder.LeavePresShell(aFrame, target);
   NS_ENSURE_SUCCESS(rv, rv);
 
 #ifdef DEBUG
   if (gDumpEventList) {
-    fprintf(stderr, "Event handling --- (%d,%d):\n", aRect.x, aRect.y);
+    fprintf(stdout, "Event handling --- (%d,%d):\n", aRect.x, aRect.y);
     nsFrame::PrintDisplayList(&builder, list);
   }
 #endif
 
   nsDisplayItem::HitTestState hitTestState;
   list.HitTest(&builder, target, &hitTestState, &aOutFrames);
   list.DeleteAll();
   return NS_OK;
@@ -1596,17 +1596,17 @@ nsLayoutUtils::PaintFrame(nsRenderingCon
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (builder.GetHadToIgnorePaintSuppression()) {
     willFlushRetainedLayers = PR_TRUE;
   }
 
 #ifdef DEBUG
   if (gDumpPaintList) {
-    fprintf(stderr, "Painting --- before optimization (dirty %d,%d,%d,%d):\n",
+    fprintf(stdout, "Painting --- before optimization (dirty %d,%d,%d,%d):\n",
             dirtyRect.x, dirtyRect.y, dirtyRect.width, dirtyRect.height);
     nsFrame::PrintDisplayList(&builder, list);
   }
 #endif
 
   list.ComputeVisibilityForRoot(&builder, &visibleRegion);
 
   PRUint32 flags = nsDisplayList::PAINT_DEFAULT;
@@ -1648,20 +1648,20 @@ nsLayoutUtils::PaintFrame(nsRenderingCon
       excludedRegion.Sub(excludedRegion, visibleRegion);
       nsIntRegion windowRegion(excludedRegion.ToNearestPixels(presContext->AppUnitsPerDevPixel()));
       widget->UpdateOpaqueRegion(windowRegion);
     }
   }
 
 #ifdef DEBUG
   if (gDumpPaintList) {
-    fprintf(stderr, "Painting --- after optimization:\n");
+    fprintf(stdout, "Painting --- after optimization:\n");
     nsFrame::PrintDisplayList(&builder, list);
 
-    fprintf(stderr, "Painting --- retained layer tree:\n");
+    fprintf(stdout, "Painting --- retained layer tree:\n");
     builder.LayerBuilder()->DumpRetainedLayerTree();
   }
 #endif
 
   // Flush the list so we don't trigger the IsEmpty-on-destruction assertion
   list.DeleteAll();
   return NS_OK;
 }