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

Unified Diff: Source/core/rendering/RenderLayer.h

Issue 58543002: Use a boolean hasCompositedLayerMapping() accessor instead of the pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased 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/rendering/RenderLayer.h
diff --git a/Source/core/rendering/RenderLayer.h b/Source/core/rendering/RenderLayer.h
index d48d8448369f91a96d0105e4565930c5643759d3..c19b2bc272fac77157c5c6df469dba343b420ee1 100644
--- a/Source/core/rendering/RenderLayer.h
+++ b/Source/core/rendering/RenderLayer.h
@@ -345,8 +345,10 @@ public:
CompositingState compositingState() const;
- // NOTE: If you are accessing the CompositedLayerMapping as a boolean condition to determine the state of compositing for this layer,
- // then you may have incorrect logic. Use compositingState() instead.
+ bool hasCompositedLayerMapping() const { return m_compositedLayerMapping.get(); }
+ // NOTE: If you are accessing the CompositedLayerMapping() as a boolean condition to determine the state of compositing for this layer,
+ // then you may have incorrect logic. Use compositingState() instead, or if you really know you just care about the existence of
+ // compositedLayerMapping versus the compositing state, use hasCompositedLayerMapping() instead.
CompositedLayerMapping* compositedLayerMapping() const { return m_compositedLayerMapping.get(); }
CompositedLayerMapping* ensureCompositedLayerMapping();
void clearCompositedLayerMapping(bool layerBeingDestroyed = false);

Powered by Google App Engine
This is Rietveld 408576698