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

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

Issue 88863002: Land layer squashing behind a flag (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: removed bogus asserts Created 7 years 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/RenderLayerClipper.cpp ('k') | Source/core/rendering/RenderLayerCompositor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderLayerCompositor.h
diff --git a/Source/core/rendering/RenderLayerCompositor.h b/Source/core/rendering/RenderLayerCompositor.h
index a8b18b7d9e05a47c381617e9f356e0b0465418cc..24658c0230490a02ccfb467cbeca3b7d37e6539f 100644
--- a/Source/core/rendering/RenderLayerCompositor.h
+++ b/Source/core/rendering/RenderLayerCompositor.h
@@ -229,6 +229,25 @@ private:
void addToOverlapMap(OverlapMap&, RenderLayer*, IntRect& layerBounds, bool& boundsComputed);
void addToOverlapMapRecursive(OverlapMap&, RenderLayer*, RenderLayer* ancestorLayer = 0);
+ struct SquashingState {
+ SquashingState()
+ : mostRecentMapping(0)
+ , hasMostRecentMapping(false)
+ , nextSquashedLayerIndex(0) { }
+
+ void updateSquashingStateForNewMapping(CompositedLayerMappingPtr, bool hasNewCompositedLayerMapping, IntPoint newOffsetFromAbsolute);
+
+ // The most recent composited backing that the layer should squash onto if needed.
+ CompositedLayerMappingPtr mostRecentMapping;
+ bool hasMostRecentMapping;
+
+ // Offset in absolute coordinates of the compositedLayerMapping's owning layer.
+ IntPoint offsetFromAbsolute;
+
+ // Counter that tracks what index the next RenderLayer would be if it gets squashed to the current squashing layer.
+ size_t nextSquashedLayerIndex;
+ };
+
// Forces an update for all frames of frame tree recursively. Used only when the mainFrame compositor is ready to
// finish all deferred work.
static void finishCompositingUpdateForFrameTree(Frame*);
@@ -238,7 +257,7 @@ private:
// Defines which RenderLayers will paint into which composited backings, by allocating and destroying CompositedLayerMappings as needed.
void assignLayersToBackings(RenderLayer*, bool& layersChanged);
- void assignLayersToBackingsInternal(RenderLayer*, bool& layersChanged);
+ void assignLayersToBackingsInternal(RenderLayer*, SquashingState&, bool& layersChanged);
// Recurses down the tree, parenting descendant compositing layers and collecting an array of child layers for the current compositing layer.
void rebuildCompositingLayerTree(RenderLayer*, Vector<GraphicsLayer*>& childGraphicsLayersOfEnclosingLayer, int depth);
« no previous file with comments | « Source/core/rendering/RenderLayerClipper.cpp ('k') | Source/core/rendering/RenderLayerCompositor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698