mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1208661 - Show display list and layer textures in-line in the HTML paint dump. r=BenWa
This commit is contained in:
parent
b275777f5e
commit
13a2ca6935
@ -1705,6 +1705,11 @@ Layer::Dump(std::stringstream& aStream, const char* aPrefix, bool aDumpHtml)
|
||||
|
||||
if (aDumpHtml) {
|
||||
aStream << "</a>";
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
if (dumpClientTexture) {
|
||||
aStream << nsPrintfCString("<br><img id=\"%s\">\n", layerId.BeginReading()).get();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (Layer* mask = GetMaskLayer()) {
|
||||
|
@ -234,6 +234,14 @@ PrintDisplayItemTo(nsDisplayListBuilder* aBuilder, nsDisplayItem* aItem,
|
||||
}
|
||||
#endif
|
||||
aStream << "\n";
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
if (aDumpHtml && aItem->Painted()) {
|
||||
nsCString string(aItem->Name());
|
||||
string.Append('-');
|
||||
string.AppendInt((uint64_t)aItem);
|
||||
aStream << nsPrintfCString("<br><img id=\"%s\">\n", string.BeginReading());
|
||||
}
|
||||
#endif
|
||||
|
||||
if (aDumpSublist && list) {
|
||||
PrintDisplayListTo(aBuilder, *list, aStream, aIndent+1, aDumpHtml);
|
||||
|
@ -3312,7 +3312,16 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram
|
||||
gfxUtils::sDumpPaintFile = stderr;
|
||||
}
|
||||
if (gfxUtils::sDumpPaintingToFile) {
|
||||
*ss << "<html><head><script>var array = {}; function ViewImage(index) { window.location = array[index]; }</script></head><body>";
|
||||
*ss << "<html><head><script>\n"
|
||||
"var array = {};\n"
|
||||
"function ViewImage(index) { \n"
|
||||
" var image = document.getElementById(index);\n"
|
||||
" if (image.src) {\n"
|
||||
" image.removeAttribute('src');\n"
|
||||
" } else {\n"
|
||||
" image.src = array[index];\n"
|
||||
" }\n"
|
||||
"}</script></head><body>";
|
||||
}
|
||||
#endif
|
||||
*ss << nsPrintfCString("Painting --- before optimization (dirty %d,%d,%d,%d):\n",
|
||||
|
Loading…
Reference in New Issue
Block a user