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

Unified Diff: Source/core/inspector/InspectorLayerTreeAgent.cpp

Issue 59063003: Don't coerce pointers to compositor layer mappings to booleans. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebaaaase Created 7 years, 1 month 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: Source/core/inspector/InspectorLayerTreeAgent.cpp
diff --git a/Source/core/inspector/InspectorLayerTreeAgent.cpp b/Source/core/inspector/InspectorLayerTreeAgent.cpp
index 5f4df0d79a3582e0b3aacde1c19de3125c906436..609e35e89342f27848c6d3e2915b1661b38b7153 100644
--- a/Source/core/inspector/InspectorLayerTreeAgent.cpp
+++ b/Source/core/inspector/InspectorLayerTreeAgent.cpp
@@ -152,11 +152,10 @@ void InspectorLayerTreeAgent::layerTreeDidChange()
void InspectorLayerTreeAgent::didPaint(RenderObject* renderer, GraphicsContext*, const LayoutRect& rect)
{
RenderLayer* renderLayer = toRenderLayerModelObject(renderer)->layer();
- CompositedLayerMapping* compositedLayerMapping = renderLayer->compositedLayerMapping();
// Should only happen for FrameView paints when compositing is off. Consider different instrumentation method for that.
- if (!compositedLayerMapping)
+ if (renderLayer->compositingState() != PaintsIntoOwnBacking)
shawnsingh 2013/11/05 10:20:27 It makes sense if this would never be called when
Ian Vollick 2013/11/08 03:35:12 Yep, I'm pretty certain. I've updated the code wit
return;
- GraphicsLayer* graphicsLayer = compositedLayerMapping->mainGraphicsLayer();
+ GraphicsLayer* graphicsLayer = renderLayer->compositedLayerMapping()->mainGraphicsLayer();
RefPtr<TypeBuilder::DOM::Rect> domRect = TypeBuilder::DOM::Rect::create()
.setX(rect.x())
.setY(rect.y())
@@ -179,7 +178,7 @@ PassRefPtr<TypeBuilder::Array<TypeBuilder::LayerTree::Layer> > InspectorLayerTre
void InspectorLayerTreeAgent::buildLayerIdToNodeIdMap(RenderLayer* root, LayerIdToNodeIdMap& layerIdToNodeIdMap)
{
- if (root->compositedLayerMapping()) {
+ if (root->compositingState() == PaintsIntoOwnBacking) {
shawnsingh 2013/11/05 10:20:27 I don't think this one is correct. The previous c
Ian Vollick 2013/11/08 03:35:12 I think there may have been a bug in the old code.
if (Node* node = root->renderer()->generatingNode()) {
GraphicsLayer* graphicsLayer = root->compositedLayerMapping()->childForSuperlayers();
layerIdToNodeIdMap.set(graphicsLayer->platformLayer()->id(), idForNode(node));

Powered by Google App Engine
This is Rietveld 408576698