Add support for dumping the GraphicsLayer tree via notifyutil
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Sep 2018 22:05:42 +0000 (22:05 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Sep 2018 22:05:42 +0000 (22:05 +0000)
commit72dec82bd5de4c9f625cfa639ee582a1fc3beaac
tree566657bee142a15b37e128b035d6c6502e858e33
parent737eafa766836334aedd7cd91b5bd219ea2d32f4
Add support for dumping the GraphicsLayer tree via notifyutil
https://bugs.webkit.org/show_bug.cgi?id=189639

Reviewed by Zalan Bujtas.

Make "notifyutil -p com.apple.WebKit.showGraphicsLayerTree" work. It dumps the GraphicsLayer tree
for each top-level document (GraphicsLayers are connected across frame boundaries, so this prints
the entire tree for each main frame).

It uses WTFLogAlways rather than fprintf() so output shows on all platforms (other tree dumps should
be converted in the same way).

* page/mac/PageMac.mm:
(WebCore::Page::platformInitialize):
* platform/graphics/GraphicsLayer.cpp:
(showGraphicsLayerTree):
* rendering/RenderLayerCompositor.cpp:
(showGraphicsLayerTreeForCompositor):
* rendering/RenderLayerCompositor.h:
* rendering/RenderObject.cpp:
(WebCore::printGraphicsLayerTreeForLiveDocuments):
* rendering/RenderObject.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236087 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/page/mac/PageMac.mm
Source/WebCore/platform/graphics/GraphicsLayer.cpp
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebCore/rendering/RenderLayerCompositor.h
Source/WebCore/rendering/RenderObject.cpp
Source/WebCore/rendering/RenderObject.h