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

Unified Diff: third_party/WebKit/Source/core/frame/LocalFrame.cpp

Issue 2380683006: SPv2: Add support for tracking raster paint invalidations in testing. (Closed)
Patch Set: none Created 4 years, 3 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/frame/LocalFrame.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
index 2fc86456311b0382a23b1f0838c3974991a6c542..b1527dffff455b0cf8839d75845c4ea84f917a41 100644
--- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
@@ -778,18 +778,22 @@ String LocalFrame::layerTreeAsText(unsigned flags) const
if (contentLayoutItem().isNull())
return String();
- std::unique_ptr<JSONObject> layerTree = contentLayoutItem().compositor()->layerTreeAsJSON(static_cast<LayerTreeFlags>(flags));
+ std::unique_ptr<JSONObject> layers;
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled())
+ layers = view()->compositedLayersAsJSON(static_cast<LayerTreeFlags>(flags));
+ else
+ layers = contentLayoutItem().compositor()->layerTreeAsJSON(static_cast<LayerTreeFlags>(flags));
if (flags & LayerTreeIncludesPaintInvalidations) {
std::unique_ptr<JSONArray> objectPaintInvalidations = m_view->trackedObjectPaintInvalidationsAsJSON();
if (objectPaintInvalidations && objectPaintInvalidations->size()) {
- if (!layerTree)
- layerTree = JSONObject::create();
- layerTree->setArray("objectPaintInvalidations", std::move(objectPaintInvalidations));
+ if (!layers)
+ layers = JSONObject::create();
+ layers->setArray("objectPaintInvalidations", std::move(objectPaintInvalidations));
}
}
- return layerTree ? layerTree->toPrettyJSONString() : String();
+ return layers ? layers->toPrettyJSONString() : String();
}
bool LocalFrame::shouldThrottleRendering() const

Powered by Google App Engine
This is Rietveld 408576698