| Index: third_party/WebKit/Source/core/frame/LocalFrame.cpp
|
| diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
|
| index 68ff6e0e920b56189424e7e442f1b099973e9f43..c560ef942a27f947000ff5996ca4294ae33c31c0 100644
|
| --- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
|
| @@ -69,6 +69,7 @@
|
| #include "core/paint/TransformRecorder.h"
|
| #include "core/svg/SVGDocumentExtensions.h"
|
| #include "platform/DragImage.h"
|
| +#include "platform/JSONValues.h"
|
| #include "platform/PluginScriptForbiddenScope.h"
|
| #include "platform/RuntimeEnabledFeatures.h"
|
| #include "platform/ScriptForbiddenScope.h"
|
| @@ -735,7 +736,18 @@ String LocalFrame::layerTreeAsText(unsigned flags) const
|
| if (contentLayoutItem().isNull())
|
| return String();
|
|
|
| - return contentLayoutItem().compositor()->layerTreeAsText(static_cast<LayerTreeFlags>(flags));
|
| + RefPtr<JSONObject> layerTree = contentLayoutItem().compositor()->layerTreeAsJSON(static_cast<LayerTreeFlags>(flags));
|
| +
|
| + if (flags & LayerTreeIncludesPaintInvalidations) {
|
| + RefPtr<JSONArray> objectPaintInvalidations = m_view->trackedObjectPaintInvalidationsAsJSON();
|
| + if (objectPaintInvalidations) {
|
| + if (!layerTree)
|
| + layerTree = JSONObject::create();
|
| + layerTree->setArray("objectPaintInvalidations", objectPaintInvalidations);
|
| + }
|
| + }
|
| +
|
| + return layerTree ? layerTree->toPrettyJSONString() : String();
|
| }
|
|
|
| bool LocalFrame::shouldThrottleRendering() const
|
|
|