| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 class RenderLayerStackingNode; | 42 class RenderLayerStackingNode; |
| 43 class RenderPart; | 43 class RenderPart; |
| 44 class RenderVideo; | 44 class RenderVideo; |
| 45 class ScrollingCoordinator; | 45 class ScrollingCoordinator; |
| 46 class StickyPositionViewportConstraints; | 46 class StickyPositionViewportConstraints; |
| 47 | 47 |
| 48 enum CompositingUpdateType { | 48 enum CompositingUpdateType { |
| 49 CompositingUpdateNone, | 49 CompositingUpdateNone, |
| 50 CompositingUpdateOnCompositedScroll, | 50 CompositingUpdateOnCompositedScroll, |
| 51 CompositingUpdateAfterCompositingInputChange, | 51 CompositingUpdateAfterCompositingInputChange, |
| 52 CompositingUpdateRebuildTree, |
| 52 }; | 53 }; |
| 53 | 54 |
| 54 enum CompositingStateTransitionType { | 55 enum CompositingStateTransitionType { |
| 55 NoCompositingStateChange, | 56 NoCompositingStateChange, |
| 56 AllocateOwnCompositedLayerMapping, | 57 AllocateOwnCompositedLayerMapping, |
| 57 RemoveOwnCompositedLayerMapping, | 58 RemoveOwnCompositedLayerMapping, |
| 58 PutInSquashingLayer, | 59 PutInSquashingLayer, |
| 59 RemoveFromSquashingLayer | 60 RemoveFromSquashingLayer |
| 60 }; | 61 }; |
| 61 | 62 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 87 bool hasAcceleratedCompositing() const { return m_hasAcceleratedCompositing;
} | 88 bool hasAcceleratedCompositing() const { return m_hasAcceleratedCompositing;
} |
| 88 bool layerSquashingEnabled() const; | 89 bool layerSquashingEnabled() const; |
| 89 | 90 |
| 90 bool acceleratedCompositingForOverflowScrollEnabled() const; | 91 bool acceleratedCompositingForOverflowScrollEnabled() const; |
| 91 | 92 |
| 92 bool rootShouldAlwaysComposite() const; | 93 bool rootShouldAlwaysComposite() const; |
| 93 | 94 |
| 94 // Copy the accelerated compositing related flags from Settings | 95 // Copy the accelerated compositing related flags from Settings |
| 95 void updateAcceleratedCompositingSettings(); | 96 void updateAcceleratedCompositingSettings(); |
| 96 | 97 |
| 97 // Called when the layer hierarchy needs to be updated (compositing layers h
ave been | |
| 98 // created, destroyed or re-parented). | |
| 99 void setCompositingLayersNeedRebuild(); | |
| 100 | |
| 101 // Used to indicate that a compositing update will be needed for the next fr
ame that gets drawn. | 98 // Used to indicate that a compositing update will be needed for the next fr
ame that gets drawn. |
| 102 void setNeedsCompositingUpdate(CompositingUpdateType); | 99 void setNeedsCompositingUpdate(CompositingUpdateType); |
| 103 | 100 |
| 104 void didLayout(); | 101 void didLayout(); |
| 105 | 102 |
| 106 enum UpdateLayerCompositingStateOptions { | 103 enum UpdateLayerCompositingStateOptions { |
| 107 Normal, | 104 Normal, |
| 108 UseChickenEggHacks, // Use this to trigger temporary chicken-egg hacks.
See crbug.com/339892. | 105 UseChickenEggHacks, // Use this to trigger temporary chicken-egg hacks.
See crbug.com/339892. |
| 109 }; | 106 }; |
| 110 | 107 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 void attachRootLayer(RootLayerAttachment); | 224 void attachRootLayer(RootLayerAttachment); |
| 228 void detachRootLayer(); | 225 void detachRootLayer(); |
| 229 | 226 |
| 230 void updateOverflowControlsLayers(); | 227 void updateOverflowControlsLayers(); |
| 231 | 228 |
| 232 Page* page() const; | 229 Page* page() const; |
| 233 | 230 |
| 234 GraphicsLayerFactory* graphicsLayerFactory() const; | 231 GraphicsLayerFactory* graphicsLayerFactory() const; |
| 235 ScrollingCoordinator* scrollingCoordinator() const; | 232 ScrollingCoordinator* scrollingCoordinator() const; |
| 236 | 233 |
| 237 bool compositingLayersNeedRebuild(); | |
| 238 | |
| 239 void enableCompositingModeIfNeeded(); | 234 void enableCompositingModeIfNeeded(); |
| 240 | 235 |
| 241 bool requiresHorizontalScrollbarLayer() const; | 236 bool requiresHorizontalScrollbarLayer() const; |
| 242 bool requiresVerticalScrollbarLayer() const; | 237 bool requiresVerticalScrollbarLayer() const; |
| 243 bool requiresScrollCornerLayer() const; | 238 bool requiresScrollCornerLayer() const; |
| 244 #if USE(RUBBER_BANDING) | 239 #if USE(RUBBER_BANDING) |
| 245 bool requiresOverhangLayers() const; | 240 bool requiresOverhangLayers() const; |
| 246 #endif | 241 #endif |
| 247 | 242 |
| 248 void applyUpdateLayerCompositingStateChickenEggHacks(RenderLayer*, Compositi
ngStateTransitionType compositedLayerUpdate); | 243 void applyUpdateLayerCompositingStateChickenEggHacks(RenderLayer*, Compositi
ngStateTransitionType compositedLayerUpdate); |
| 249 | 244 |
| 250 DocumentLifecycle& lifecycle() const; | 245 DocumentLifecycle& lifecycle() const; |
| 251 | 246 |
| 252 void applyOverlayFullscreenVideoAdjustment(); | 247 void applyOverlayFullscreenVideoAdjustment(); |
| 253 | 248 |
| 254 RenderView& m_renderView; | 249 RenderView& m_renderView; |
| 255 OwnPtr<GraphicsLayer> m_rootContentLayer; | 250 OwnPtr<GraphicsLayer> m_rootContentLayer; |
| 256 OwnPtr<GraphicsLayer> m_rootTransformLayer; | 251 OwnPtr<GraphicsLayer> m_rootTransformLayer; |
| 257 | 252 |
| 258 CompositingReasonFinder m_compositingReasonFinder; | 253 CompositingReasonFinder m_compositingReasonFinder; |
| 259 | 254 |
| 260 CompositingUpdateType m_pendingUpdateType; | 255 CompositingUpdateType m_pendingUpdateType; |
| 261 | 256 |
| 262 bool m_hasAcceleratedCompositing; | 257 bool m_hasAcceleratedCompositing; |
| 263 bool m_compositing; | 258 bool m_compositing; |
| 264 bool m_compositingLayersNeedRebuild; | |
| 265 | 259 |
| 266 // The root layer doesn't composite if it's a non-scrollable frame. | 260 // The root layer doesn't composite if it's a non-scrollable frame. |
| 267 // So, after a layout we set this dirty bit to know that we need | 261 // So, after a layout we set this dirty bit to know that we need |
| 268 // to recompute whether the root layer should composite even if | 262 // to recompute whether the root layer should composite even if |
| 269 // none of its descendants composite. | 263 // none of its descendants composite. |
| 270 // FIXME: Get rid of all the callers of setCompositingModeEnabled | 264 // FIXME: Get rid of all the callers of setCompositingModeEnabled |
| 271 // except the one in updateIfNeeded, then rename this to | 265 // except the one in updateIfNeeded, then rename this to |
| 272 // m_compositingDirty. | 266 // m_compositingDirty. |
| 273 bool m_rootShouldAlwaysCompositeDirty; | 267 bool m_rootShouldAlwaysCompositeDirty; |
| 274 bool m_needsUpdateFixedBackground; | 268 bool m_needsUpdateFixedBackground; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 288 OwnPtr<GraphicsLayer> m_layerForVerticalScrollbar; | 282 OwnPtr<GraphicsLayer> m_layerForVerticalScrollbar; |
| 289 OwnPtr<GraphicsLayer> m_layerForScrollCorner; | 283 OwnPtr<GraphicsLayer> m_layerForScrollCorner; |
| 290 #if USE(RUBBER_BANDING) | 284 #if USE(RUBBER_BANDING) |
| 291 OwnPtr<GraphicsLayer> m_layerForOverhangShadow; | 285 OwnPtr<GraphicsLayer> m_layerForOverhangShadow; |
| 292 #endif | 286 #endif |
| 293 }; | 287 }; |
| 294 | 288 |
| 295 } // namespace WebCore | 289 } // namespace WebCore |
| 296 | 290 |
| 297 #endif // RenderLayerCompositor_h | 291 #endif // RenderLayerCompositor_h |
| OLD | NEW |