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

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

Issue 88863002: Land layer squashing behind a flag (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: not perfect but can be reviewed 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 afcfb9c5d162e1218508025e3ead04511bba658e..fbde6c3db940b696549c9a24909953495ce7abcb 100644
--- a/Source/core/rendering/RenderLayer.h
+++ b/Source/core/rendering/RenderLayer.h
@@ -354,6 +354,9 @@ public:
bool hasCompositedLayerMapping() const { return m_compositedLayerMapping.get(); }
void clearCompositedLayerMapping(bool layerBeingDestroyed = false);
+ CompositedLayerMapping* groupedMapping() const { return m_groupedMapping; }
enne (OOO) 2013/11/27 23:20:26 vollick: I wonder if this "groupedMapping" could b
shawnsingh 2013/12/02 01:55:03 Not entirely sure what the offline discussion was,
enne (OOO) 2013/12/02 18:49:00 Maybe I misunderstand, but this looks like multipl
+ void setGroupedMapping(CompositedLayerMapping* groupedMapping) { m_groupedMapping = groupedMapping; }
+
bool hasCompositedMask() const;
bool hasCompositedClippingMask() const;
bool needsCompositedScrolling() const { return m_scrollableArea && m_scrollableArea->needsCompositedScrolling(); }
@@ -443,6 +446,9 @@ public:
PassOwnPtr<Vector<FloatRect> > collectTrackedRepaintRects() const;
+ void setOffsetFromSquashingLayerOrigin(IntSize offset) { m_compositingProperties.offsetFromSquashingLayerOrigin = offset; }
+ IntSize offsetFromSquashingLayerOrigin() const { return m_compositingProperties.offsetFromSquashingLayerOrigin; }
+
private:
bool hasOverflowControls() const;
@@ -604,6 +610,11 @@ private:
void setCompositingReasons(CompositingReasons reasons) { m_compositingProperties.compositingReasons = reasons; }
CompositingReasons compositingReasons() const { return m_compositingProperties.compositingReasons; }
+ // Absolute bounds are cached here only for compositing computations. This is NOT GUARATNEED
+ // to be up-to-date for every layer; do not use this unless you know what you are doing.
+ void setAbsoluteBounds(IntRect absoluteBounds) { m_compositingProperties.absoluteBounds = absoluteBounds; }
+ IntRect absoluteBounds() const { return m_compositingProperties.absoluteBounds; }
+
friend class CompositedLayerMapping;
friend class RenderLayerCompositor;
friend class RenderLayerModelObject;
@@ -709,6 +720,13 @@ protected:
// Once computed, indicates all that a layer needs to become composited using the CompositingReasons enum bitfield.
CompositingReasons compositingReasons;
+
+ // Bounds of the layer in absolute coordinates. It is cached here only so that we can
+ // compute correct offsets for where layers should paint into their composited backings.
+ IntRect absoluteBounds;
+
+ // Used for invalidating this layer's contents on the squashing GraphicsLayer.
+ IntSize offsetFromSquashingLayerOrigin;
};
CompositingProperties m_compositingProperties;
@@ -726,6 +744,8 @@ private:
OwnPtr<CompositedLayerMapping> m_compositedLayerMapping;
OwnPtr<RenderLayerScrollableArea> m_scrollableArea;
+ CompositedLayerMapping* m_groupedMapping;
+
RenderLayerRepainter m_repainter;
RenderLayerClipper m_clipper; // FIXME: Lazily allocate?
OwnPtr<RenderLayerStackingNode> m_stackingNode;

Powered by Google App Engine
This is Rietveld 408576698