Bug 741682 - Add component alpha bounds and opaque regions to display list dumping. r=roc

This commit is contained in:
Matt Woodrow 2012-07-23 15:00:36 +12:00
parent a8f8937b62
commit 123b68c4c3

View File

@ -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, "<a href=\"javascript:ViewImage('%s')\">", 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, "</a>");
}