From 123b68c4c345f14b32e3faaee72c29506a4500c6 Mon Sep 17 00:00:00 2001 From: Matt Woodrow Date: Mon, 23 Jul 2012 15:00:36 +1200 Subject: [PATCH] Bug 741682 - Add component alpha bounds and opaque regions to display list dumping. r=roc --- layout/base/nsLayoutDebugger.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/layout/base/nsLayoutDebugger.cpp b/layout/base/nsLayoutDebugger.cpp index 0e91fd5c030..ff3fe88425d 100644 --- a/layout/base/nsLayoutDebugger.cpp +++ b/layout/base/nsLayoutDebugger.cpp @@ -152,6 +152,7 @@ PrintDisplayListTo(nsDisplayListBuilder* aBuilder, const nsDisplayList& aList, } nscolor color; nsRect vis = i->GetVisibleRect(); + nsRect component = i->GetComponentAlphaBounds(aBuilder); nsDisplayList* list = i->GetList(); nsRegion opaque; if (i->GetType() == nsDisplayItem::TYPE_TRANSFORM) { @@ -169,12 +170,16 @@ PrintDisplayListTo(nsDisplayListBuilder* aBuilder, const nsDisplayList& aList, string.AppendInt((PRUint64)i); fprintf(aOutput, "", string.BeginReading()); } - fprintf(aOutput, "%s %p(%s) (%d,%d,%d,%d)(%d,%d,%d,%d)%s%s", + fprintf(aOutput, "%s %p(%s) (%d,%d,%d,%d)(%d,%d,%d,%d)(%d,%d,%d,%d)%s", i->Name(), (void*)f, NS_ConvertUTF16toUTF8(fName).get(), rect.x, rect.y, rect.width, rect.height, vis.x, vis.y, vis.width, vis.height, - opaque.IsEmpty() ? "" : " opaque", + component.x, component.y, component.width, component.height, i->IsUniform(aBuilder, &color) ? " uniform" : ""); + nsRegionRectIterator iter(opaque); + for (const nsRect* r = iter.Next(); r; r = iter.Next()) { + printf("(opaque %d,%d,%d,%d)", r->x, r->y, r->width, r->height); + } if (i->Painted()) { fprintf(aOutput, ""); }