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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 bool allocateOrClearCompositedLayerMapping(RenderLayer*); 222 bool allocateOrClearCompositedLayerMapping(RenderLayer*);
223 223
224 void clearMappingForRenderLayerIncludingDescendants(RenderLayer*); 224 void clearMappingForRenderLayerIncludingDescendants(RenderLayer*);
225 225
226 // Repaint the given rect (which is layer's coords), and regions of child la yers that intersect that rect. 226 // Repaint the given rect (which is layer's coords), and regions of child la yers that intersect that rect.
227 void recursiveRepaintLayer(RenderLayer*, const IntRect* = 0); 227 void recursiveRepaintLayer(RenderLayer*, const IntRect* = 0);
228 228
229 void addToOverlapMap(OverlapMap&, RenderLayer*, IntRect& layerBounds, bool& boundsComputed); 229 void addToOverlapMap(OverlapMap&, RenderLayer*, IntRect& layerBounds, bool& boundsComputed);
230 void addToOverlapMapRecursive(OverlapMap&, RenderLayer*, RenderLayer* ancest orLayer = 0); 230 void addToOverlapMapRecursive(OverlapMap&, RenderLayer*, RenderLayer* ancest orLayer = 0);
231 231
232 struct SquashingState {
233 SquashingState()
234 : mostRecentMapping(0)
235 , hasMostRecentMapping(false)
236 , nextSquashedLayerIndex(0) { }
237
238 void updateSquashingStateForNewMapping(CompositedLayerMappingPtr, bool h asNewCompositedLayerMapping, IntPoint newOffsetFromAbsolute);
239
240 // The most recent composited backing that the layer should squash onto if needed.
241 CompositedLayerMappingPtr mostRecentMapping;
242 bool hasMostRecentMapping;
243
244 // Offset in absolute coordinates of the compositedLayerMapping's owning layer.
245 IntPoint offsetFromAbsolute;
246
247 // Counter that tracks what index the next RenderLayer would be if it ge ts squashed to the current squashing layer.
248 size_t nextSquashedLayerIndex;
249 };
250
232 // Forces an update for all frames of frame tree recursively. Used only when the mainFrame compositor is ready to 251 // Forces an update for all frames of frame tree recursively. Used only when the mainFrame compositor is ready to
233 // finish all deferred work. 252 // finish all deferred work.
234 static void finishCompositingUpdateForFrameTree(Frame*); 253 static void finishCompositingUpdateForFrameTree(Frame*);
235 254
236 // Returns true if any layer's compositing changed 255 // Returns true if any layer's compositing changed
237 void computeCompositingRequirements(RenderLayer* ancestorLayer, RenderLayer* , OverlapMap*, struct CompositingRecursionData&, bool& descendantHas3DTransform, Vector<RenderLayer*>& unclippedDescendants); 256 void computeCompositingRequirements(RenderLayer* ancestorLayer, RenderLayer* , OverlapMap*, struct CompositingRecursionData&, bool& descendantHas3DTransform, Vector<RenderLayer*>& unclippedDescendants);
238 257
239 // Defines which RenderLayers will paint into which composited backings, by allocating and destroying CompositedLayerMappings as needed. 258 // Defines which RenderLayers will paint into which composited backings, by allocating and destroying CompositedLayerMappings as needed.
240 void assignLayersToBackings(RenderLayer*, bool& layersChanged); 259 void assignLayersToBackings(RenderLayer*, bool& layersChanged);
241 void assignLayersToBackingsInternal(RenderLayer*, bool& layersChanged); 260 void assignLayersToBackingsInternal(RenderLayer*, SquashingState&, bool& lay ersChanged);
242 261
243 // Recurses down the tree, parenting descendant compositing layers and colle cting an array of child layers for the current compositing layer. 262 // Recurses down the tree, parenting descendant compositing layers and colle cting an array of child layers for the current compositing layer.
244 void rebuildCompositingLayerTree(RenderLayer*, Vector<GraphicsLayer*>& child GraphicsLayersOfEnclosingLayer, int depth); 263 void rebuildCompositingLayerTree(RenderLayer*, Vector<GraphicsLayer*>& child GraphicsLayersOfEnclosingLayer, int depth);
245 264
246 // Recurses down the tree, updating layer geometry only. 265 // Recurses down the tree, updating layer geometry only.
247 void updateLayerTreeGeometry(RenderLayer*); 266 void updateLayerTreeGeometry(RenderLayer*);
248 267
249 // Hook compositing layers together 268 // Hook compositing layers together
250 void setCompositingParent(RenderLayer* childLayer, RenderLayer* parentLayer) ; 269 void setCompositingParent(RenderLayer* childLayer, RenderLayer* parentLayer) ;
251 void removeCompositedChildren(RenderLayer*); 270 void removeCompositedChildren(RenderLayer*);
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 OwnPtr<GraphicsLayer> m_layerForScrollCorner; 363 OwnPtr<GraphicsLayer> m_layerForScrollCorner;
345 #if USE(RUBBER_BANDING) 364 #if USE(RUBBER_BANDING)
346 OwnPtr<GraphicsLayer> m_layerForOverhangShadow; 365 OwnPtr<GraphicsLayer> m_layerForOverhangShadow;
347 #endif 366 #endif
348 }; 367 };
349 368
350 369
351 } // namespace WebCore 370 } // namespace WebCore
352 371
353 #endif // RenderLayerCompositor_h 372 #endif // RenderLayerCompositor_h
OLDNEW
« 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