Index: third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp |
diff --git a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp |
index ca9b72a3583c5c5b37e395d0ddad3e7d26f09efc..147be3bb66ff624d2dbd95c2c72bb5e50a57349e 100644 |
--- a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp |
+++ b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp |
@@ -55,6 +55,7 @@ |
#include "core/paint/FramePainter.h" |
#include "core/paint/TransformRecorder.h" |
#include "platform/Histogram.h" |
+#include "platform/JSONValues.h" |
#include "platform/RuntimeEnabledFeatures.h" |
#include "platform/ScriptForbiddenScope.h" |
#include "platform/TraceEvent.h" |
@@ -646,12 +647,12 @@ bool PaintLayerCompositor::scrollingLayerDidChange(PaintLayer* layer) |
return false; |
} |
-String PaintLayerCompositor::layerTreeAsText(LayerTreeFlags flags) |
+PassRefPtr<JSONObject> PaintLayerCompositor::layerTreeAsJSON(LayerTreeFlags flags) const |
{ |
ASSERT(lifecycle().state() >= DocumentLifecycle::PaintInvalidationClean || m_layoutView.frameView()->shouldThrottleRendering()); |
if (!m_rootContentLayer) |
- return String(); |
+ return nullptr; |
// We skip dumping the scroll and clip layers to keep layerTreeAsText output |
// similar between platforms (unless we explicitly request dumping from the |
@@ -660,7 +661,7 @@ String PaintLayerCompositor::layerTreeAsText(LayerTreeFlags flags) |
if (flags & LayerTreeIncludesRootLayer) |
rootLayer = rootGraphicsLayer(); |
- return rootLayer->layerTreeAsText(flags); |
+ return rootLayer->layerTreeAsJSON(flags); |
} |
PaintLayerCompositor* PaintLayerCompositor::frameContentsCompositor(LayoutPart* layoutObject) |