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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 void setNeedsUpdateCompositingRequirementsState() { m_needsUpdateCompositing
RequirementsState = true; } | 92 void setNeedsUpdateCompositingRequirementsState() { m_needsUpdateCompositing
RequirementsState = true; } |
93 | 93 |
94 // Rebuild the tree of compositing layers | 94 // Rebuild the tree of compositing layers |
95 void updateCompositingLayers(CompositingUpdateType, RenderLayer* updateRoot
= 0); | 95 void updateCompositingLayers(CompositingUpdateType, RenderLayer* updateRoot
= 0); |
96 | 96 |
97 // Update the compositing state of the given layer. Returns true if that sta
te changed. | 97 // Update the compositing state of the given layer. Returns true if that sta
te changed. |
98 enum CompositingChangeRepaint { CompositingChangeRepaintNow, CompositingChan
geWillRepaintLater }; | 98 enum CompositingChangeRepaint { CompositingChangeRepaintNow, CompositingChan
geWillRepaintLater }; |
99 bool updateLayerCompositingState(RenderLayer*, CompositingChangeRepaint = Co
mpositingChangeRepaintNow); | 99 bool updateLayerCompositingState(RenderLayer*, CompositingChangeRepaint = Co
mpositingChangeRepaintNow); |
100 | 100 |
101 // Update the geometry for compositing children of compositingAncestor. | 101 // Update the geometry for compositing children of compositingAncestor. |
102 void updateCompositingDescendantGeometry(RenderLayer* compositingAncestor, R
enderLayer*, bool compositedChildrenOnly); | 102 void updateCompositingDescendantGeometry(RenderLayer* compositingAncestor, R
enderLayer*, HashSet<RenderLayer*>& visited, bool compositedChildrenOnly); |
| 103 |
| 104 // Ensures that scroll parents have been processed before recurring into upd
ateCompositedDescendantGeometry for the current layer. |
| 105 void updateCompositingDescendantGeometryForLayerAndScrollParents(RenderLayer
* compositingAncestor, RenderLayer*, HashSet<RenderLayer*>& visited, bool compos
itedChildrenOnly); |
103 | 106 |
104 // Whether layer's backing needs a graphics layer to do clipping by an ances
tor (non-stacking-context parent with overflow). | 107 // Whether layer's backing needs a graphics layer to do clipping by an ances
tor (non-stacking-context parent with overflow). |
105 bool clippedByAncestor(RenderLayer*) const; | 108 bool clippedByAncestor(const RenderLayer*) const; |
106 // Whether layer's backing needs a graphics layer to clip z-order children o
f the given layer. | 109 // Whether layer's backing needs a graphics layer to clip z-order children o
f the given layer. |
107 bool clipsCompositingDescendants(const RenderLayer*) const; | 110 bool clipsCompositingDescendants(const RenderLayer*) const; |
108 | 111 |
109 // Whether the given layer needs an extra 'contents' layer. | 112 // Whether the given layer needs an extra 'contents' layer. |
110 bool needsContentsCompositingLayer(const RenderLayer*) const; | 113 bool needsContentsCompositingLayer(const RenderLayer*) const; |
111 | 114 |
112 bool supportsFixedRootBackgroundCompositing() const; | 115 bool supportsFixedRootBackgroundCompositing() const; |
113 bool needsFixedRootBackgroundLayer(const RenderLayer*) const; | 116 bool needsFixedRootBackgroundLayer(const RenderLayer*) const; |
114 GraphicsLayer* fixedRootBackgroundLayer() const; | 117 GraphicsLayer* fixedRootBackgroundLayer() const; |
115 | 118 |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 // Repaint the given rect (which is layer's coords), and regions of child la
yers that intersect that rect. | 237 // Repaint the given rect (which is layer's coords), and regions of child la
yers that intersect that rect. |
235 void recursiveRepaintLayer(RenderLayer*, const IntRect* = 0); | 238 void recursiveRepaintLayer(RenderLayer*, const IntRect* = 0); |
236 | 239 |
237 void addToOverlapMap(OverlapMap&, RenderLayer*, IntRect& layerBounds, bool&
boundsComputed); | 240 void addToOverlapMap(OverlapMap&, RenderLayer*, IntRect& layerBounds, bool&
boundsComputed); |
238 void addToOverlapMapRecursive(OverlapMap&, RenderLayer*, RenderLayer* ancest
orLayer = 0); | 241 void addToOverlapMapRecursive(OverlapMap&, RenderLayer*, RenderLayer* ancest
orLayer = 0); |
239 | 242 |
240 // Returns true if any layer's compositing changed | 243 // Returns true if any layer's compositing changed |
241 void computeCompositingRequirements(RenderLayer* ancestorLayer, RenderLayer*
, OverlapMap*, struct CompositingState&, bool& layersChanged, bool& descendantHa
s3DTransform, Vector<RenderLayer*>& unclippedDescendants); | 244 void computeCompositingRequirements(RenderLayer* ancestorLayer, RenderLayer*
, OverlapMap*, struct CompositingState&, bool& layersChanged, bool& descendantHa
s3DTransform, Vector<RenderLayer*>& unclippedDescendants); |
242 | 245 |
243 // Recurses down the tree, parenting descendant compositing layers and colle
cting an array of child layers for the current compositing layer. | 246 // 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); | 247 void rebuildCompositingLayerTree(RenderLayer*, Vector<GraphicsLayer*>& child
GraphicsLayersOfEnclosingLayer, HashSet<RenderLayer*>& visited, int depth); |
| 248 |
| 249 // Ensures that scroll parents have been processed before recurring into reb
uildCompositingLayerTree for the current layer. |
| 250 void rebuildCompositingLayerTreeForLayerAndScrollParents(RenderLayer*, Vecto
r<GraphicsLayer*>& childGraphicsLayersOfEnclosingLayer, HashSet<RenderLayer*>& v
isited, HashMap<RenderLayer*, Vector<GraphicsLayer*> >& childGraphicsLayersOfScr
ollParents, int depth); |
245 | 251 |
246 // Recurses down the tree, updating layer geometry only. | 252 // Recurses down the tree, updating layer geometry only. |
247 void updateLayerTreeGeometry(RenderLayer*, int depth); | 253 void updateLayerTreeGeometry(RenderLayer*, HashSet<RenderLayer*>& visited, i
nt depth); |
| 254 |
| 255 // Ensures that scroll parents have been processed before recurring into upd
ateLayerTree for the current layer. |
| 256 void updateLayerTreeGeometryForLayerAndScrollParents(RenderLayer*, HashSet<R
enderLayer*>& visited, int depth); |
248 | 257 |
249 // Hook compositing layers together | 258 // Hook compositing layers together |
250 void setCompositingParent(RenderLayer* childLayer, RenderLayer* parentLayer)
; | 259 void setCompositingParent(RenderLayer* childLayer, RenderLayer* parentLayer)
; |
251 void removeCompositedChildren(RenderLayer*); | 260 void removeCompositedChildren(RenderLayer*); |
252 | 261 |
253 bool layerHas3DContent(const RenderLayer*) const; | 262 bool layerHas3DContent(const RenderLayer*) const; |
254 bool isRunningAcceleratedTransformAnimation(RenderObject*) const; | 263 bool isRunningAcceleratedTransformAnimation(RenderObject*) const; |
255 | 264 |
256 bool hasAnyAdditionalCompositedLayers(const RenderLayer* rootLayer) const; | 265 bool hasAnyAdditionalCompositedLayers(const RenderLayer* rootLayer) const; |
257 | 266 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 int m_secondaryCompositedLayerCount; // count of layers that have to be comp
osited because of stacking or overlap. | 369 int m_secondaryCompositedLayerCount; // count of layers that have to be comp
osited because of stacking or overlap. |
361 double m_obligatoryBackingStoreBytes; | 370 double m_obligatoryBackingStoreBytes; |
362 double m_secondaryBackingStoreBytes; | 371 double m_secondaryBackingStoreBytes; |
363 #endif | 372 #endif |
364 }; | 373 }; |
365 | 374 |
366 | 375 |
367 } // namespace WebCore | 376 } // namespace WebCore |
368 | 377 |
369 #endif // RenderLayerCompositor_h | 378 #endif // RenderLayerCompositor_h |
OLD | NEW |