Bug 739604 - Split out dumping of paint buffers from paint lists. r=mattwoodrow

Split dumping of paint buffers into a separate environment variable, vs.
dumping of paint buffers to allow for dumping only of paint lists.
This commit is contained in:
Chris Lord 2012-03-28 19:10:28 +01:00
parent 3f7ec4f974
commit 4d9834dc9e
3 changed files with 5 additions and 3 deletions

View File

@ -738,7 +738,8 @@ gfxUtils::CopyAsDataURL(DrawTarget* aDT)
}
}
bool gfxUtils::sDumpPainting = getenv("MOZ_DUMP_PAINT_LIST") != 0;
bool gfxUtils::sDumpPaintList = getenv("MOZ_DUMP_PAINT_LIST") != 0;
bool gfxUtils::sDumpPainting = getenv("MOZ_DUMP_PAINT") != 0;
bool gfxUtils::sDumpPaintingToFile = getenv("MOZ_DUMP_PAINT_TO_FILE") != 0;
FILE *gfxUtils::sDumpPaintFile = NULL;
#endif

View File

@ -171,6 +171,7 @@ public:
*/
static void CopyAsDataURL(mozilla::gfx::DrawTarget* aDT);
static bool sDumpPaintList;
static bool sDumpPainting;
static bool sDumpPaintingToFile;
static FILE* sDumpPaintFile;

View File

@ -1740,7 +1740,7 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram
}
#ifdef MOZ_DUMP_PAINTING
if (gfxUtils::sDumpPainting) {
if (gfxUtils::sDumpPaintList || gfxUtils::sDumpPainting) {
if (gfxUtils::sDumpPaintingToFile) {
nsCString string("dump-");
string.AppendInt(gPaintCount);
@ -1804,7 +1804,7 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram
}
#ifdef MOZ_DUMP_PAINTING
if (gfxUtils::sDumpPainting) {
if (gfxUtils::sDumpPaintList || gfxUtils::sDumpPainting) {
fprintf(gfxUtils::sDumpPaintFile, "</script>Painting --- after optimization:\n");
nsFrame::PrintDisplayList(&builder, list, gfxUtils::sDumpPaintFile);