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

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

Issue 1153023002: layout-tests: Add flag for including compositingReasons in layerTreeAsText(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 5 years, 7 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
« no previous file with comments | « Source/core/testing/Internals.idl ('k') | Source/platform/graphics/GraphicsLayerClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/GraphicsLayer.cpp
diff --git a/Source/platform/graphics/GraphicsLayer.cpp b/Source/platform/graphics/GraphicsLayer.cpp
index d8884ed1cf32ccf04f1cc257901784c1cc9d3f51..8d47b9406905e1fd2bbee892796194169828eb5b 100644
--- a/Source/platform/graphics/GraphicsLayer.cpp
+++ b/Source/platform/graphics/GraphicsLayer.cpp
@@ -701,11 +701,12 @@ PassRefPtr<JSONObject> GraphicsLayer::layerTreeAsJSON(LayerTreeFlags flags, Rend
json->setBoolean("hasClipParent", true);
}
- if (flags & LayerTreeIncludesDebugInfo) {
+ if (flags & (LayerTreeIncludesDebugInfo | LayerTreeIncludesCompositingReasons)) {
+ bool debug = flags & LayerTreeIncludesDebugInfo;
RefPtr<JSONArray> compositingReasonsJSON = adoptRef(new JSONArray);
for (size_t i = 0; i < kNumberOfCompositingReasons; ++i) {
if (m_debugInfo.compositingReasons() & kCompositingReasonStringMap[i].reason)
- compositingReasonsJSON->pushString(kCompositingReasonStringMap[i].description);
+ compositingReasonsJSON->pushString(debug ? kCompositingReasonStringMap[i].description : kCompositingReasonStringMap[i].shortName);
}
json->setArray("compositingReasons", compositingReasonsJSON);
}
« no previous file with comments | « Source/core/testing/Internals.idl ('k') | Source/platform/graphics/GraphicsLayerClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698