OLD | NEW |
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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 bool allocateOrClearCompositedLayerMapping(RenderLayer*); | 225 bool allocateOrClearCompositedLayerMapping(RenderLayer*); |
226 | 226 |
227 void clearMappingForRenderLayerIncludingDescendants(RenderLayer*); | 227 void clearMappingForRenderLayerIncludingDescendants(RenderLayer*); |
228 | 228 |
229 // Repaint the given rect (which is layer's coords), and regions of child la
yers that intersect that rect. | 229 // Repaint the given rect (which is layer's coords), and regions of child la
yers that intersect that rect. |
230 void recursiveRepaintLayer(RenderLayer*, const IntRect* = 0); | 230 void recursiveRepaintLayer(RenderLayer*, const IntRect* = 0); |
231 | 231 |
232 void addToOverlapMap(OverlapMap&, RenderLayer*, IntRect& layerBounds, bool&
boundsComputed); | 232 void addToOverlapMap(OverlapMap&, RenderLayer*, IntRect& layerBounds, bool&
boundsComputed); |
233 void addToOverlapMapRecursive(OverlapMap&, RenderLayer*, RenderLayer* ancest
orLayer = 0); | 233 void addToOverlapMapRecursive(OverlapMap&, RenderLayer*, RenderLayer* ancest
orLayer = 0); |
234 | 234 |
| 235 struct SquashingState { |
| 236 SquashingState() |
| 237 : mostRecentMapping(0) |
| 238 , hasMostRecentMapping(false) { } |
| 239 |
| 240 // The most recent composited backing that the layer should squash onto
if needed. |
| 241 CompositedLayerMappingPtr mostRecentMapping; |
| 242 bool hasMostRecentMapping; |
| 243 |
| 244 // Offset from absolute coordinates of the target's owning layer to the
backing's own local space. |
| 245 IntSize absToLocalOffset; |
| 246 }; |
| 247 |
235 // Forces an update for all frames of frame tree recursively. Used only when
the mainFrame compositor is ready to | 248 // Forces an update for all frames of frame tree recursively. Used only when
the mainFrame compositor is ready to |
236 // finish all deferred work. | 249 // finish all deferred work. |
237 static void finishCompositingUpdateForFrameTree(Frame*); | 250 static void finishCompositingUpdateForFrameTree(Frame*); |
238 | 251 |
239 // Returns true if any layer's compositing changed | 252 // Returns true if any layer's compositing changed |
240 void computeCompositingRequirements(RenderLayer* ancestorLayer, RenderLayer*
, OverlapMap*, struct CompositingRecursionData&, bool& descendantHas3DTransform,
Vector<RenderLayer*>& unclippedDescendants); | 253 void computeCompositingRequirements(RenderLayer* ancestorLayer, RenderLayer*
, OverlapMap*, struct CompositingRecursionData&, bool& descendantHas3DTransform,
Vector<RenderLayer*>& unclippedDescendants); |
241 | 254 |
242 // Defines which RenderLayers will paint into which composited backings, by
allocating and destroying CompositedLayerMappings as needed. | 255 // Defines which RenderLayers will paint into which composited backings, by
allocating and destroying CompositedLayerMappings as needed. |
243 void assignLayersToBackings(RenderLayer*, bool& layersChanged); | 256 void assignLayersToBackings(RenderLayer*, SquashingState&, bool& layersChang
ed); |
244 | 257 |
245 // Recurses down the tree, parenting descendant compositing layers and colle
cting an array of child layers for the current compositing layer. | 258 // Recurses down the tree, parenting descendant compositing layers and colle
cting an array of child layers for the current compositing layer. |
246 void rebuildCompositingLayerTree(RenderLayer*, Vector<GraphicsLayer*>& child
GraphicsLayersOfEnclosingLayer, int depth); | 259 void rebuildCompositingLayerTree(RenderLayer*, Vector<GraphicsLayer*>& child
GraphicsLayersOfEnclosingLayer, int depth); |
247 | 260 |
248 // Recurses down the tree, updating layer geometry only. | 261 // Recurses down the tree, updating layer geometry only. |
249 void updateLayerTreeGeometry(RenderLayer*); | 262 void updateLayerTreeGeometry(RenderLayer*); |
250 | 263 |
251 // Hook compositing layers together | 264 // Hook compositing layers together |
252 void setCompositingParent(RenderLayer* childLayer, RenderLayer* parentLayer)
; | 265 void setCompositingParent(RenderLayer* childLayer, RenderLayer* parentLayer)
; |
253 void removeCompositedChildren(RenderLayer*); | 266 void removeCompositedChildren(RenderLayer*); |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 OwnPtr<GraphicsLayer> m_layerForScrollCorner; | 360 OwnPtr<GraphicsLayer> m_layerForScrollCorner; |
348 #if USE(RUBBER_BANDING) | 361 #if USE(RUBBER_BANDING) |
349 OwnPtr<GraphicsLayer> m_layerForOverhangShadow; | 362 OwnPtr<GraphicsLayer> m_layerForOverhangShadow; |
350 #endif | 363 #endif |
351 }; | 364 }; |
352 | 365 |
353 | 366 |
354 } // namespace WebCore | 367 } // namespace WebCore |
355 | 368 |
356 #endif // RenderLayerCompositor_h | 369 #endif // RenderLayerCompositor_h |
OLD | NEW |