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

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

Issue 206283003: Avoid tree walks when computing RenderLayer::scrollParent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 6 years, 9 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 | Source/core/rendering/RenderLayer.cpp » ('j') | Source/core/rendering/RenderLayer.cpp » ('J')
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 cf9654aa369d9899df8cf2db658482a291ef91a7..abd5115e989406e9245f185b6a0ec9ecb4b6bcf5 100644
--- a/Source/core/rendering/RenderLayer.h
+++ b/Source/core/rendering/RenderLayer.h
@@ -358,6 +358,9 @@ public:
// compositing state may legally be read.
bool isAllowedToQueryCompositingState() const;
+ // This returns true if our current phase is the compositing update.
+ bool isInCompositingUpdate() const;
+
CompositedLayerMappingPtr compositedLayerMapping() const;
CompositedLayerMappingPtr ensureCompositedLayerMapping();
@@ -479,7 +482,18 @@ public:
bool hasDirectReasonsForCompositing() const { return compositingReasons() & CompositingReasonComboAllDirectReasons; }
+ void clearAncestorDependentPropertyCache();
+
private:
+ struct AncestorDependentPropertyCache {
+ AncestorDependentPropertyCache();
+ RenderObject* containingBlock;
+ RenderLayer* ancestorCompositedScrollingLayer;
+ RenderLayer* scrollParent;
+ };
+
+ void ensureAncestorDependentPropertyCache() const;
+
bool hasOverflowControls() const;
void setIsUnclippedDescendant(bool isUnclippedDescendant) { m_isUnclippedDescendant = isUnclippedDescendant; }
@@ -578,7 +592,6 @@ private:
bool shouldBeSelfPaintingLayer() const;
-private:
// FIXME: We should only create the stacking node if needed.
bool requiresStackingNode() const { return true; }
void updateStackingNode();
@@ -630,7 +643,6 @@ private:
friend class RenderLayerCompositor;
friend class RenderLayerModelObject;
-private:
LayerType m_layerType;
// Self-painting layer is an optimization where we avoid the heavy RenderLayer painting
@@ -756,6 +768,8 @@ private:
OwnPtr<CompositedLayerMapping> m_compositedLayerMapping;
OwnPtr<RenderLayerScrollableArea> m_scrollableArea;
+ mutable OwnPtr<AncestorDependentPropertyCache> m_ancestorDependentPropertyCache;
+
CompositedLayerMapping* m_groupedMapping;
RenderLayerRepainter m_repainter;
« no previous file with comments | « no previous file | Source/core/rendering/RenderLayer.cpp » ('j') | Source/core/rendering/RenderLayer.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698