Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2422)

Unified Diff: third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp

Issue 2051333005: Let FrameView track object paint invalidations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@TrackInvalidation
Patch Set: NeedsRebaseline Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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)

Powered by Google App Engine
This is Rietveld 408576698