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

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

Issue 23050018: DevTools: expose layer compositing reasons and paint count via layer tree agent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fixed gcc build Created 7 years, 4 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/platform/graphics/GraphicsLayer.h ('k') | Source/devtools/front_end/LayerTreeModel.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/graphics/GraphicsLayer.cpp
diff --git a/Source/core/platform/graphics/GraphicsLayer.cpp b/Source/core/platform/graphics/GraphicsLayer.cpp
index 150c996d257737384e143f5f729a6b747408b58c..6b6505187d94cf264d69571656488d616460a3b2 100644
--- a/Source/core/platform/graphics/GraphicsLayer.cpp
+++ b/Source/core/platform/graphics/GraphicsLayer.cpp
@@ -115,14 +115,13 @@ GraphicsLayer::GraphicsLayer(GraphicsLayerClient* client)
, m_masksToBounds(false)
, m_drawsContent(false)
, m_contentsVisible(true)
- , m_showRepaintCounter(false)
, m_paintingPhase(GraphicsLayerPaintAllWithOverflowClip)
, m_contentsOrientation(CompositingCoordinatesTopDown)
, m_parent(0)
, m_maskLayer(0)
, m_replicaLayer(0)
, m_replicatedLayer(0)
- , m_repaintCount(0)
+ , m_paintCount(0)
, m_contentsLayer(0)
, m_contentsLayerId(0)
, m_linkHighlight(0)
@@ -358,8 +357,10 @@ void GraphicsLayer::setOffsetFromRenderer(const IntSize& offset, ShouldSetNeedsD
void GraphicsLayer::paintGraphicsLayerContents(GraphicsContext& context, const IntRect& clip)
{
- if (m_client)
- m_client->paintContents(this, context, m_paintingPhase, clip);
+ if (!m_client)
+ return;
+ incrementPaintCount();
+ m_client->paintContents(this, context, m_paintingPhase, clip);
}
String GraphicsLayer::animationNameForTransition(AnimatedPropertyID property)
@@ -892,6 +893,7 @@ WebKit::WebString GraphicsLayer::debugName(WebKit::WebLayer* webLayer)
void GraphicsLayer::setCompositingReasons(WebKit::WebCompositingReasons reasons)
{
+ m_compositingReasons = reasons;
m_layer->layer()->setCompositingReasons(reasons);
}
« no previous file with comments | « Source/core/platform/graphics/GraphicsLayer.h ('k') | Source/devtools/front_end/LayerTreeModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698