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); |
} |