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

Unified Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.h

Issue 1636563003: Put rare PaintLayer fields into PaintLayerRareData (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.h
diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.h b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.h
index e133f32587eb0859934b54f0e8ee9cf0a5206ab0..ade90266cf6646811da8d3a56d846b8d2be250c4 100644
--- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.h
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.h
@@ -61,13 +61,19 @@ enum GraphicsLayerUpdateScope {
GraphicsLayerUpdateSubtree,
};
-// CompositedLayerMapping keeps track of how Layers of the layout tree correspond to
+// CompositedLayerMapping keeps track of how PaintLayers correspond to
// GraphicsLayers of the composited layer tree. Each instance of CompositedLayerMapping
// manages a small cluster of GraphicsLayers and the references to which Layers
// and paint phases contribute to each GraphicsLayer.
//
-// Currently (Oct. 2013) there is one CompositedLayerMapping for each Layer,
-// but this is likely to evolve soon.
+// - If a PaintLayer is composited,
+// - if it paints into its own backings (GraphicsLayers), it owns a
+// CompositedLayerMapping (PaintLayer::compositedLayerMapping()) to keep
+// track the backings;
+// - if it paints into grouped backing (i.e. it's squashed), it has a pointer
+// (PaintLayer::groupedMapping()) to the CompositedLayerMapping into which
+// the PaintLayer is squashed;
+// - Otherwise the PaintLayer doesn't own or directly reference any CompositedLayerMapping.
class CORE_EXPORT CompositedLayerMapping final : public GraphicsLayerClient {
WTF_MAKE_NONCOPYABLE(CompositedLayerMapping); USING_FAST_MALLOC(CompositedLayerMapping);
@@ -253,8 +259,8 @@ private:
bool requiresVerticalScrollbarLayer() const { return m_owningLayer.scrollableArea() && m_owningLayer.scrollableArea()->verticalScrollbar(); }
bool requiresScrollCornerLayer() const { return m_owningLayer.scrollableArea() && !m_owningLayer.scrollableArea()->scrollCornerAndResizerRect().isEmpty(); }
bool updateScrollingLayers(bool scrollingLayers);
- void updateScrollParent(PaintLayer*);
- void updateClipParent(PaintLayer* scrollParent);
+ void updateScrollParent(const PaintLayer*);
+ void updateClipParent(const PaintLayer* scrollParent);
bool updateSquashingLayers(bool needsSquashingLayers);
void updateDrawsContent();
void updateChildrenTransform();
@@ -306,9 +312,9 @@ private:
// Return true if |m_owningLayer|'s compositing ancestor is not a descendant (inclusive) of the
// clipping container for |m_owningLayer|.
- bool owningLayerClippedByLayerNotAboveCompositedAncestor(PaintLayer* scrollParent);
+ bool owningLayerClippedByLayerNotAboveCompositedAncestor(const PaintLayer* scrollParent);
- PaintLayer* scrollParent();
+ const PaintLayer* scrollParent();
// Clear the groupedMapping entry on the layer at the given index, only if that layer does
// not appear earlier in the set of layers for this object.
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698