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

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: 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/RenderLayerCompositor.h
diff --git a/Source/core/rendering/RenderLayerCompositor.h b/Source/core/rendering/RenderLayerCompositor.h
index dfc918551584adbc2024084ce630b4fe31a43998..644431b0985a06f0e18c071baaf1d550458c7226 100644
--- a/Source/core/rendering/RenderLayerCompositor.h
+++ b/Source/core/rendering/RenderLayerCompositor.h
@@ -232,6 +232,19 @@ private:
void addToOverlapMap(OverlapMap&, RenderLayer*, IntRect& layerBounds, bool& boundsComputed);
void addToOverlapMapRecursive(OverlapMap&, RenderLayer*, RenderLayer* ancestorLayer = 0);
+ struct SquashingState {
+ SquashingState()
+ : mostRecentMapping(0)
+ , hasMostRecentMapping(false) { }
+
+ // The most recent composited backing that the layer should squash onto if needed.
+ CompositedLayerMappingPtr mostRecentMapping;
+ bool hasMostRecentMapping;
+
+ // Offset from absolute coordinates of the target's owning layer to the backing's own local space.
+ IntSize absToLocalOffset;
+ };
+
// 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*);
@@ -240,7 +253,7 @@ private:
void computeCompositingRequirements(RenderLayer* ancestorLayer, RenderLayer*, OverlapMap*, struct CompositingRecursionData&, bool& descendantHas3DTransform, Vector<RenderLayer*>& unclippedDescendants);
// Defines which RenderLayers will paint into which composited backings, by allocating and destroying CompositedLayerMappings as needed.
- void assignLayersToBackings(RenderLayer*, bool& layersChanged);
+ void assignLayersToBackings(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);

Powered by Google App Engine
This is Rietveld 408576698