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 10 matching lines...) Expand all Loading... |
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 */ | 24 */ |
25 | 25 |
26 #ifndef RenderLayerCompositor_h | 26 #ifndef RenderLayerCompositor_h |
27 #define RenderLayerCompositor_h | 27 #define RenderLayerCompositor_h |
28 | 28 |
29 #include "core/page/ChromeClient.h" | 29 #include "core/page/ChromeClient.h" |
30 #include "core/rendering/RenderLayer.h" | 30 #include "core/rendering/RenderLayer.h" |
| 31 #include "core/rendering/compositing/CompositingPropertyUpdater.h" |
31 #include "core/rendering/compositing/CompositingReasonFinder.h" | 32 #include "core/rendering/compositing/CompositingReasonFinder.h" |
32 #include "core/rendering/compositing/GraphicsLayerUpdater.h" | 33 #include "core/rendering/compositing/GraphicsLayerUpdater.h" |
33 #include "platform/graphics/GraphicsLayerClient.h" | 34 #include "platform/graphics/GraphicsLayerClient.h" |
34 #include "wtf/HashMap.h" | 35 #include "wtf/HashMap.h" |
35 | 36 |
36 namespace WebCore { | 37 namespace WebCore { |
37 | 38 |
38 class FixedPositionViewportConstraints; | 39 class FixedPositionViewportConstraints; |
39 class GraphicsLayer; | 40 class GraphicsLayer; |
40 class RenderEmbeddedObject; | 41 class RenderEmbeddedObject; |
(...skipping 14 matching lines...) Expand all Loading... |
55 // RenderLayerCompositor manages the hierarchy of | 56 // RenderLayerCompositor manages the hierarchy of |
56 // composited RenderLayers. It determines which RenderLayers | 57 // composited RenderLayers. It determines which RenderLayers |
57 // become compositing, and creates and maintains a hierarchy of | 58 // become compositing, and creates and maintains a hierarchy of |
58 // GraphicsLayers based on the RenderLayer painting order. | 59 // GraphicsLayers based on the RenderLayer painting order. |
59 // | 60 // |
60 // There is one RenderLayerCompositor per RenderView. | 61 // There is one RenderLayerCompositor per RenderView. |
61 | 62 |
62 class RenderLayerCompositor FINAL : public GraphicsLayerClient { | 63 class RenderLayerCompositor FINAL : public GraphicsLayerClient { |
63 WTF_MAKE_FAST_ALLOCATED; | 64 WTF_MAKE_FAST_ALLOCATED; |
64 public: | 65 public: |
65 enum BoundsUpdateType { | |
66 DoNotForceUpdate, | |
67 ForceUpdate, | |
68 }; | |
69 | |
70 // FIXME: This constructor should take a reference. | 66 // FIXME: This constructor should take a reference. |
71 explicit RenderLayerCompositor(RenderView&); | 67 explicit RenderLayerCompositor(RenderView&); |
72 virtual ~RenderLayerCompositor(); | 68 virtual ~RenderLayerCompositor(); |
73 | 69 |
74 // Return true if this RenderView is in "compositing mode" (i.e. has one or
more | 70 // Return true if this RenderView is in "compositing mode" (i.e. has one or
more |
75 // composited RenderLayers) | 71 // composited RenderLayers) |
76 bool inCompositingMode() const { return m_compositing; } | 72 bool inCompositingMode() const { return m_compositing; } |
77 // This will make a compositing layer at the root automatically, and hook up
to | 73 // This will make a compositing layer at the root automatically, and hook up
to |
78 // the native view/window system. | 74 // the native view/window system. |
79 void enableCompositingMode(bool enable = true); | 75 void enableCompositingMode(bool enable = true); |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 OwnPtr<GraphicsLayer> m_rootTransformLayer; | 322 OwnPtr<GraphicsLayer> m_rootTransformLayer; |
327 | 323 |
328 CompositingReasonFinder m_compositingReasonFinder; | 324 CompositingReasonFinder m_compositingReasonFinder; |
329 | 325 |
330 bool m_hasAcceleratedCompositing; | 326 bool m_hasAcceleratedCompositing; |
331 bool m_showRepaintCounter; | 327 bool m_showRepaintCounter; |
332 | 328 |
333 // FIXME: This should absolutely not be mutable. | 329 // FIXME: This should absolutely not be mutable. |
334 mutable bool m_needsToRecomputeCompositingRequirements; | 330 mutable bool m_needsToRecomputeCompositingRequirements; |
335 bool m_needsToUpdateLayerTreeGeometry; | 331 bool m_needsToUpdateLayerTreeGeometry; |
| 332 |
| 333 // FIXME: We should remove m_pendingUpdateType and propagate the bits with C
ompositingPropertyUpdater instead. |
336 GraphicsLayerUpdater::UpdateType m_pendingUpdateType; | 334 GraphicsLayerUpdater::UpdateType m_pendingUpdateType; |
337 | 335 CompositingPropertyUpdater::UpdateType m_pendingPropertyUpdateType; |
338 RenderLayerCompositor::BoundsUpdateType m_recomputeLayerBoundsUpdateType; | |
339 | 336 |
340 bool m_compositing; | 337 bool m_compositing; |
341 bool m_compositingLayersNeedRebuild; | 338 bool m_compositingLayersNeedRebuild; |
342 bool m_forceCompositingMode; | 339 bool m_forceCompositingMode; |
343 bool m_needsUpdateCompositingRequirementsState; | 340 bool m_needsUpdateCompositingRequirementsState; |
344 | 341 |
345 bool m_isTrackingRepaints; // Used for testing. | 342 bool m_isTrackingRepaints; // Used for testing. |
346 | 343 |
347 RootLayerAttachment m_rootLayerAttachment; | 344 RootLayerAttachment m_rootLayerAttachment; |
348 | 345 |
(...skipping 17 matching lines...) Expand all Loading... |
366 OwnPtr<GraphicsLayer> m_layerForScrollCorner; | 363 OwnPtr<GraphicsLayer> m_layerForScrollCorner; |
367 #if USE(RUBBER_BANDING) | 364 #if USE(RUBBER_BANDING) |
368 OwnPtr<GraphicsLayer> m_layerForOverhangShadow; | 365 OwnPtr<GraphicsLayer> m_layerForOverhangShadow; |
369 #endif | 366 #endif |
370 }; | 367 }; |
371 | 368 |
372 | 369 |
373 } // namespace WebCore | 370 } // namespace WebCore |
374 | 371 |
375 #endif // RenderLayerCompositor_h | 372 #endif // RenderLayerCompositor_h |
OLD | NEW |