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

Unified Diff: third_party/WebKit/Source/platform/graphics/GraphicsLayerDebugInfo.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/GraphicsLayerDebugInfo.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayerDebugInfo.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsLayerDebugInfo.cpp
index 3820b8a536e2fe648467901518c5f9c07d30c511..b46bcad0239da2581e4db6080d33d121b2d435d8 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsLayerDebugInfo.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayerDebugInfo.cpp
@@ -25,6 +25,7 @@ namespace blink {
GraphicsLayerDebugInfo::GraphicsLayerDebugInfo()
: m_compositingReasons(CompositingReasonNone)
+ , m_squashingDisallowedReasons(SquashingDisallowedReasonsNone)
, m_ownerNodeId(0)
{
}
@@ -36,6 +37,7 @@ scoped_refptr<base::trace_event::TracedValue> GraphicsLayerDebugInfo::asTracedVa
scoped_refptr<base::trace_event::TracedValue> tracedValue = new base::trace_event::TracedValue;
appendAnnotatedInvalidateRects(tracedValue.get());
appendCompositingReasons(tracedValue.get());
+ appendSquashingDisallowedReasons(tracedValue.get());
appendOwnerNodeId(tracedValue.get());
return tracedValue;
}
@@ -69,6 +71,17 @@ void GraphicsLayerDebugInfo::appendCompositingReasons(base::trace_event::TracedV
tracedValue->EndArray();
}
+void GraphicsLayerDebugInfo::appendSquashingDisallowedReasons(base::trace_event::TracedValue* tracedValue) const
+{
+ tracedValue->BeginArray("squashing_disallowed_reasons");
+ for (size_t i = 0; i < kNumberOfSquashingDisallowedReasons; ++i) {
+ if (!(m_compositingReasons & kSquashingDisallowedReasonStringMap[i].reason))
+ continue;
+ tracedValue->AppendString(kSquashingDisallowedReasonStringMap[i].description);
+ }
+ tracedValue->EndArray();
+}
+
void GraphicsLayerDebugInfo::appendOwnerNodeId(base::trace_event::TracedValue* tracedValue) const
{
if (!m_ownerNodeId)

Powered by Google App Engine
This is Rietveld 408576698