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

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: Update comment for hasCompositedLayerMapping 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
« no previous file with comments | « Source/core/rendering/CompositedLayerMappingPtr.h ('k') | Source/core/rendering/RenderLayer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderLayer.h
diff --git a/Source/core/rendering/RenderLayer.h b/Source/core/rendering/RenderLayer.h
index d48d8448369f91a96d0105e4565930c5643759d3..6b34194d4389a43b74fe4c89b96b120af8f785d8 100644
--- a/Source/core/rendering/RenderLayer.h
+++ b/Source/core/rendering/RenderLayer.h
@@ -45,6 +45,7 @@
#ifndef RenderLayer_h
#define RenderLayer_h
+#include "core/rendering/CompositedLayerMappingPtr.h"
#include "core/rendering/CompositingReasons.h"
#include "core/rendering/LayerPaintingInfo.h"
#include "core/rendering/PaintInfo.h"
@@ -345,10 +346,13 @@ public:
CompositingState compositingState() const;
- // NOTE: If you are accessing the CompositedLayerMapping as a boolean condition to determine the state of compositing for this layer,
+ CompositedLayerMappingPtr compositedLayerMapping() const { return m_compositedLayerMapping.get(); }
+ CompositedLayerMappingPtr ensureCompositedLayerMapping();
+
+ // NOTE: If you are using hasCompositedLayerMapping to determine the state of compositing for this layer,
+ // (and not just to do bookkeeping related to the mapping like, say, allocating or deallocating a mapping),
// then you may have incorrect logic. Use compositingState() instead.
- CompositedLayerMapping* compositedLayerMapping() const { return m_compositedLayerMapping.get(); }
- CompositedLayerMapping* ensureCompositedLayerMapping();
+ bool hasCompositedLayerMapping() const { return m_compositedLayerMapping.get(); }
void clearCompositedLayerMapping(bool layerBeingDestroyed = false);
bool hasCompositedMask() const;
« no previous file with comments | « Source/core/rendering/CompositedLayerMappingPtr.h ('k') | Source/core/rendering/RenderLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698