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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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*, bool compositedChildrenOnly); |
103 | 103 |
104 // Whether layer's backing needs a graphics layer to do clipping by an ances
tor (non-stacking-context parent with overflow). | 104 // 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; | 105 bool clippedByAncestor(const RenderLayer*) const; |
106 // Whether layer's backing needs a graphics layer to clip z-order children o
f the given layer. | 106 // Whether layer's backing needs a graphics layer to clip z-order children o
f the given layer. |
107 bool clipsCompositingDescendants(const RenderLayer*) const; | 107 bool clipsCompositingDescendants(const RenderLayer*) const; |
108 | 108 |
109 // Whether the given layer needs an extra 'contents' layer. | 109 // Whether the given layer needs an extra 'contents' layer. |
110 bool needsContentsCompositingLayer(const RenderLayer*) const; | 110 bool needsContentsCompositingLayer(const RenderLayer*) const; |
111 | 111 |
112 bool supportsFixedRootBackgroundCompositing() const; | 112 bool supportsFixedRootBackgroundCompositing() const; |
113 bool needsFixedRootBackgroundLayer(const RenderLayer*) const; | 113 bool needsFixedRootBackgroundLayer(const RenderLayer*) const; |
114 GraphicsLayer* fixedRootBackgroundLayer() const; | 114 GraphicsLayer* fixedRootBackgroundLayer() const; |
115 | 115 |
(...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. | 234 // 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); | 235 void recursiveRepaintLayer(RenderLayer*, const IntRect* = 0); |
236 | 236 |
237 void addToOverlapMap(OverlapMap&, RenderLayer*, IntRect& layerBounds, bool&
boundsComputed); | 237 void addToOverlapMap(OverlapMap&, RenderLayer*, IntRect& layerBounds, bool&
boundsComputed); |
238 void addToOverlapMapRecursive(OverlapMap&, RenderLayer*, RenderLayer* ancest
orLayer = 0); | 238 void addToOverlapMapRecursive(OverlapMap&, RenderLayer*, RenderLayer* ancest
orLayer = 0); |
239 | 239 |
240 // Returns true if any layer's compositing changed | 240 // 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); | 241 void computeCompositingRequirements(RenderLayer* ancestorLayer, RenderLayer*
, OverlapMap*, struct CompositingState&, bool& layersChanged, bool& descendantHa
s3DTransform, Vector<RenderLayer*>& unclippedDescendants); |
242 | 242 |
243 // Recurses down the tree, parenting descendant compositing layers and colle
cting an array of child layers for the current compositing layer. | 243 // 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); | 244 void rebuildCompositingLayerTree(RenderLayer*, Vector<GraphicsLayer*>& child
GraphicsLayersOfEnclosingLayer, HashSet<RenderLayer*>& visited, int depth); |
| 245 |
| 246 // Ensures that scroll parents have been processed before recurring into reb
uildCompositingLayerTree for the current layer. |
| 247 void rebuildCompositingLayerTreeForLayerAndScrollParents(RenderLayer*, Vecto
r<GraphicsLayer*>& childGraphicsLayersOfEnclosingLayer, HashSet<RenderLayer*>& v
isited, HashMap<RenderLayer*, Vector<GraphicsLayer*> >& childGraphicsLayersOfScr
ollParents, int depth); |
245 | 248 |
246 // Recurses down the tree, updating layer geometry only. | 249 // Recurses down the tree, updating layer geometry only. |
247 void updateLayerTreeGeometry(RenderLayer*, int depth); | 250 void updateLayerTreeGeometry(RenderLayer*, HashSet<RenderLayer*>& visited, i
nt depth); |
| 251 |
| 252 // Ensures that scroll parents have been processed before recurring into upd
ateLayerTree for the current layer. |
| 253 void updateLayerTreeGeometryForLayerAndScrollParents(RenderLayer*, HashSet<R
enderLayer*>& visited, int depth); |
248 | 254 |
249 // Hook compositing layers together | 255 // Hook compositing layers together |
250 void setCompositingParent(RenderLayer* childLayer, RenderLayer* parentLayer)
; | 256 void setCompositingParent(RenderLayer* childLayer, RenderLayer* parentLayer)
; |
251 void removeCompositedChildren(RenderLayer*); | 257 void removeCompositedChildren(RenderLayer*); |
252 | 258 |
253 bool layerHas3DContent(const RenderLayer*) const; | 259 bool layerHas3DContent(const RenderLayer*) const; |
254 bool isRunningAcceleratedTransformAnimation(RenderObject*) const; | 260 bool isRunningAcceleratedTransformAnimation(RenderObject*) const; |
255 | 261 |
256 bool hasAnyAdditionalCompositedLayers(const RenderLayer* rootLayer) const; | 262 bool hasAnyAdditionalCompositedLayers(const RenderLayer* rootLayer) const; |
257 | 263 |
(...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. | 366 int m_secondaryCompositedLayerCount; // count of layers that have to be comp
osited because of stacking or overlap. |
361 double m_obligatoryBackingStoreBytes; | 367 double m_obligatoryBackingStoreBytes; |
362 double m_secondaryBackingStoreBytes; | 368 double m_secondaryBackingStoreBytes; |
363 #endif | 369 #endif |
364 }; | 370 }; |
365 | 371 |
366 | 372 |
367 } // namespace WebCore | 373 } // namespace WebCore |
368 | 374 |
369 #endif // RenderLayerCompositor_h | 375 #endif // RenderLayerCompositor_h |
OLD | NEW |