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

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

Issue 24921002: Make compositingState explicit (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: path for re-landing try #2 with removed unnecessary comment Created 7 years, 2 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/rendering/RenderBoxModelObject.cpp ('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 5468daed672b4e28f335b98b6337b6b0e9f00f56..4089b4b7764540442854ce80152822f897ce0d0e 100644
--- a/Source/core/rendering/RenderLayer.h
+++ b/Source/core/rendering/RenderLayer.h
@@ -464,12 +464,20 @@ public:
// Only safe to call from RenderLayerModelObject::destroyLayer()
void operator delete(void*);
- bool isComposited() const { return m_compositedLayerMapping; }
- bool hasCompositedMask() const;
- bool hasCompositedClippingMask() const;
- CompositedLayerMapping* compositedLayerMapping() const { return m_compositedLayerMapping.get(); }
+ CompositingState compositingState() const;
+
+ CompositedLayerMapping* compositedLayerMapping() const
+ {
+ // NOTE: Checking whether backing exists is equivalent to asking if you are in one of these two compositing states.
+ // If this is why you are using compositedLayerMapping(), consider using compositingState() instead.
+ return m_compositedLayerMapping.get();
+ }
+
CompositedLayerMapping* ensureCompositedLayerMapping();
void clearCompositedLayerMapping(bool layerBeingDestroyed = false);
+
+ bool hasCompositedMask() const;
+ bool hasCompositedClippingMask() const;
bool needsCompositedScrolling() const;
bool needsToBeStackingContainer() const;
@@ -482,7 +490,7 @@ public:
bool paintsWithTransparency(PaintBehavior paintBehavior) const
{
- return isTransparent() && ((paintBehavior & PaintBehaviorFlattenCompositingLayers) || !isComposited());
+ return isTransparent() && ((paintBehavior & PaintBehaviorFlattenCompositingLayers) || compositingState() != PaintsIntoOwnBacking);
}
bool paintsWithTransform(PaintBehavior) const;
« no previous file with comments | « Source/core/rendering/RenderBoxModelObject.cpp ('k') | Source/core/rendering/RenderLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698