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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 94 |
95 bool rootShouldAlwaysComposite() const; | 95 bool rootShouldAlwaysComposite() const; |
96 | 96 |
97 // Copy the accelerated compositing related flags from Settings | 97 // Copy the accelerated compositing related flags from Settings |
98 void updateAcceleratedCompositingSettings(); | 98 void updateAcceleratedCompositingSettings(); |
99 | 99 |
100 // Called when the layer hierarchy needs to be updated (compositing layers h
ave been | 100 // Called when the layer hierarchy needs to be updated (compositing layers h
ave been |
101 // created, destroyed or re-parented). | 101 // created, destroyed or re-parented). |
102 void setCompositingLayersNeedRebuild(); | 102 void setCompositingLayersNeedRebuild(); |
103 | 103 |
104 // Updating properties required for determining if compositing is necessary. | |
105 void updateCompositingRequirementsState(); | |
106 void setNeedsUpdateCompositingRequirementsState() { m_needsUpdateCompositing
RequirementsState = true; } | |
107 | |
108 // Used to indicate that a compositing update will be needed for the next fr
ame that gets drawn. | 104 // Used to indicate that a compositing update will be needed for the next fr
ame that gets drawn. |
109 void setNeedsCompositingUpdate(CompositingUpdateType); | 105 void setNeedsCompositingUpdate(CompositingUpdateType); |
110 | 106 |
111 enum UpdateLayerCompositingStateOptions { | 107 enum UpdateLayerCompositingStateOptions { |
112 Normal, | 108 Normal, |
113 UseChickenEggHacks, // Use this to trigger temporary chicken-egg hacks.
See crbug.com/339892. | 109 UseChickenEggHacks, // Use this to trigger temporary chicken-egg hacks.
See crbug.com/339892. |
114 }; | 110 }; |
115 | 111 |
116 // Update the compositing dirty bits, based on the compositing-impacting pro
perties of the layer. | 112 // Update the compositing dirty bits, based on the compositing-impacting pro
perties of the layer. |
117 void updateLayerCompositingState(RenderLayer*, UpdateLayerCompositingStateOp
tions = Normal); | 113 void updateLayerCompositingState(RenderLayer*, UpdateLayerCompositingStateOp
tions = Normal); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 void rootFixedBackgroundsChanged(); | 169 void rootFixedBackgroundsChanged(); |
174 | 170 |
175 bool scrollingLayerDidChange(RenderLayer*); | 171 bool scrollingLayerDidChange(RenderLayer*); |
176 | 172 |
177 String layerTreeAsText(LayerTreeFlags); | 173 String layerTreeAsText(LayerTreeFlags); |
178 | 174 |
179 GraphicsLayer* layerForHorizontalScrollbar() const { return m_layerForHorizo
ntalScrollbar.get(); } | 175 GraphicsLayer* layerForHorizontalScrollbar() const { return m_layerForHorizo
ntalScrollbar.get(); } |
180 GraphicsLayer* layerForVerticalScrollbar() const { return m_layerForVertical
Scrollbar.get(); } | 176 GraphicsLayer* layerForVerticalScrollbar() const { return m_layerForVertical
Scrollbar.get(); } |
181 GraphicsLayer* layerForScrollCorner() const { return m_layerForScrollCorner.
get(); } | 177 GraphicsLayer* layerForScrollCorner() const { return m_layerForScrollCorner.
get(); } |
182 | 178 |
183 void addOutOfFlowPositionedLayer(RenderLayer*); | |
184 void removeOutOfFlowPositionedLayer(RenderLayer*); | |
185 | |
186 void resetTrackedRepaintRects(); | 179 void resetTrackedRepaintRects(); |
187 void setTracksRepaints(bool); | 180 void setTracksRepaints(bool); |
188 | 181 |
189 void setNeedsToRecomputeCompositingRequirements() { m_needsToRecomputeCompos
itingRequirements = true; } | 182 void setNeedsToRecomputeCompositingRequirements() { m_needsToRecomputeCompos
itingRequirements = true; } |
190 | 183 |
191 virtual String debugName(const GraphicsLayer*) OVERRIDE; | 184 virtual String debugName(const GraphicsLayer*) OVERRIDE; |
192 | 185 |
193 void updateStyleDeterminedCompositingReasons(RenderLayer*); | 186 void updateStyleDeterminedCompositingReasons(RenderLayer*); |
194 | 187 |
195 // Whether the layer could ever be composited. | 188 // Whether the layer could ever be composited. |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 bool m_compositingLayersNeedRebuild; | 266 bool m_compositingLayersNeedRebuild; |
274 | 267 |
275 // The root layer doesn't composite if it's a non-scrollable frame. | 268 // The root layer doesn't composite if it's a non-scrollable frame. |
276 // So, after a layout we set this dirty bit to know that we need | 269 // So, after a layout we set this dirty bit to know that we need |
277 // to recompute whether the root layer should composite even if | 270 // to recompute whether the root layer should composite even if |
278 // none of its descendants composite. | 271 // none of its descendants composite. |
279 // FIXME: Get rid of all the callers of setCompositingModeEnabled | 272 // FIXME: Get rid of all the callers of setCompositingModeEnabled |
280 // except the one in updateIfNeeded, then rename this to | 273 // except the one in updateIfNeeded, then rename this to |
281 // m_compositingDirty. | 274 // m_compositingDirty. |
282 bool m_rootShouldAlwaysCompositeDirty; | 275 bool m_rootShouldAlwaysCompositeDirty; |
283 bool m_needsUpdateCompositingRequirementsState; | |
284 bool m_needsUpdateFixedBackground; | 276 bool m_needsUpdateFixedBackground; |
285 bool m_isTrackingRepaints; // Used for testing. | 277 bool m_isTrackingRepaints; // Used for testing. |
286 | 278 |
287 RootLayerAttachment m_rootLayerAttachment; | 279 RootLayerAttachment m_rootLayerAttachment; |
288 | 280 |
289 // Enclosing container layer, which clips for iframe content | 281 // Enclosing container layer, which clips for iframe content |
290 OwnPtr<GraphicsLayer> m_containerLayer; | 282 OwnPtr<GraphicsLayer> m_containerLayer; |
291 OwnPtr<GraphicsLayer> m_scrollLayer; | 283 OwnPtr<GraphicsLayer> m_scrollLayer; |
292 | 284 |
293 // This is used in updateCompositingRequirementsState to avoid full tree | |
294 // walks while determining if layers have unclipped descendants. | |
295 HashSet<RenderLayer*> m_outOfFlowPositionedLayers; | |
296 | |
297 // Enclosing layer for overflow controls and the clipping layer | 285 // Enclosing layer for overflow controls and the clipping layer |
298 OwnPtr<GraphicsLayer> m_overflowControlsHostLayer; | 286 OwnPtr<GraphicsLayer> m_overflowControlsHostLayer; |
299 | 287 |
300 // Layers for overflow controls | 288 // Layers for overflow controls |
301 OwnPtr<GraphicsLayer> m_layerForHorizontalScrollbar; | 289 OwnPtr<GraphicsLayer> m_layerForHorizontalScrollbar; |
302 OwnPtr<GraphicsLayer> m_layerForVerticalScrollbar; | 290 OwnPtr<GraphicsLayer> m_layerForVerticalScrollbar; |
303 OwnPtr<GraphicsLayer> m_layerForScrollCorner; | 291 OwnPtr<GraphicsLayer> m_layerForScrollCorner; |
304 #if USE(RUBBER_BANDING) | 292 #if USE(RUBBER_BANDING) |
305 OwnPtr<GraphicsLayer> m_layerForOverhangShadow; | 293 OwnPtr<GraphicsLayer> m_layerForOverhangShadow; |
306 #endif | 294 #endif |
307 }; | 295 }; |
308 | 296 |
309 } // namespace WebCore | 297 } // namespace WebCore |
310 | 298 |
311 #endif // RenderLayerCompositor_h | 299 #endif // RenderLayerCompositor_h |
OLD | NEW |