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

Unified Diff: third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp

Issue 1730653002: Move squash preventing reasons out of compositing reasons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bug and test fixes. Created 4 years, 10 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/platform/graphics/GraphicsLayer.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
index 89f0c8e8b19b7de4a70888b38afd9353645d694d..40ff0f1efea6d3674f42d581ccab36d930b2dc19 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
@@ -783,6 +783,13 @@ PassRefPtr<JSONObject> GraphicsLayer::layerTreeAsJSON(LayerTreeFlags flags, Rend
compositingReasonsJSON->pushString(debug ? kCompositingReasonStringMap[i].description : kCompositingReasonStringMap[i].shortName);
}
json->setArray("compositingReasons", compositingReasonsJSON);
+
+ RefPtr<JSONArray> squashingDisallowedReasonsJSON = adoptRef(new JSONArray);
+ for (size_t i = 0; i < kNumberOfSquashingDisallowedReasons; ++i) {
+ if (m_debugInfo.squashingDisallowedReasons() & kSquashingDisallowedReasonStringMap[i].reason)
+ squashingDisallowedReasonsJSON->pushString(debug ? kSquashingDisallowedReasonStringMap[i].description : kSquashingDisallowedReasonStringMap[i].shortName);
+ }
+ json->setArray("squashingDisallowedReasons", squashingDisallowedReasonsJSON);
}
if (m_children.size()) {
@@ -838,6 +845,11 @@ void GraphicsLayer::setCompositingReasons(CompositingReasons reasons)
m_debugInfo.setCompositingReasons(reasons);
}
+void GraphicsLayer::setSquashingDisallowedReasons(SquashingDisallowedReasons reasons)
+{
+ m_debugInfo.setSquashingDisallowedReasons(reasons);
+}
+
void GraphicsLayer::setOwnerNodeId(int nodeId)
{
m_debugInfo.setOwnerNodeId(nodeId);

Powered by Google App Engine
This is Rietveld 408576698