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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 // composited RenderLayers. It determines which RenderLayers | 55 // composited RenderLayers. It determines which RenderLayers |
56 // become compositing, and creates and maintains a hierarchy of | 56 // become compositing, and creates and maintains a hierarchy of |
57 // GraphicsLayers based on the RenderLayer painting order. | 57 // GraphicsLayers based on the RenderLayer painting order. |
58 // | 58 // |
59 // There is one RenderLayerCompositor per RenderView. | 59 // There is one RenderLayerCompositor per RenderView. |
60 | 60 |
61 class RenderLayerCompositor FINAL : public GraphicsLayerClient { | 61 class RenderLayerCompositor FINAL : public GraphicsLayerClient { |
62 WTF_MAKE_FAST_ALLOCATED; | 62 WTF_MAKE_FAST_ALLOCATED; |
63 public: | 63 public: |
64 // FIXME: This constructor should take a reference. | 64 // FIXME: This constructor should take a reference. |
65 explicit RenderLayerCompositor(RenderView*); | 65 explicit RenderLayerCompositor(RenderView&); |
66 virtual ~RenderLayerCompositor(); | 66 virtual ~RenderLayerCompositor(); |
67 | 67 |
68 // Return true if this RenderView is in "compositing mode" (i.e. has one or
more | 68 // Return true if this RenderView is in "compositing mode" (i.e. has one or
more |
69 // composited RenderLayers) | 69 // composited RenderLayers) |
70 bool inCompositingMode() const { return m_compositing; } | 70 bool inCompositingMode() const { return m_compositing; } |
71 // This will make a compositing layer at the root automatically, and hook up
to | 71 // This will make a compositing layer at the root automatically, and hook up
to |
72 // the native view/window system. | 72 // the native view/window system. |
73 void enableCompositingMode(bool enable = true); | 73 void enableCompositingMode(bool enable = true); |
74 | 74 |
75 bool inForcedCompositingMode() const { return m_forceCompositingMode; } | 75 bool inForcedCompositingMode() const { return m_forceCompositingMode; } |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 #if USE(RUBBER_BANDING) | 319 #if USE(RUBBER_BANDING) |
320 bool requiresOverhangLayers() const; | 320 bool requiresOverhangLayers() const; |
321 #endif | 321 #endif |
322 | 322 |
323 void applyUpdateLayerCompositingStateChickenEggHacks(RenderLayer*, Compositi
ngStateTransitionType compositedLayerUpdate); | 323 void applyUpdateLayerCompositingStateChickenEggHacks(RenderLayer*, Compositi
ngStateTransitionType compositedLayerUpdate); |
324 void assignLayersToBackingsForReflectionLayer(RenderLayer* reflectionLayer,
bool& layersChanged); | 324 void assignLayersToBackingsForReflectionLayer(RenderLayer* reflectionLayer,
bool& layersChanged); |
325 | 325 |
326 private: | 326 private: |
327 DocumentLifecycle& lifecycle() const; | 327 DocumentLifecycle& lifecycle() const; |
328 | 328 |
329 RenderView* m_renderView; | 329 RenderView& m_renderView; |
330 OwnPtr<GraphicsLayer> m_rootContentLayer; | 330 OwnPtr<GraphicsLayer> m_rootContentLayer; |
331 OwnPtr<GraphicsLayer> m_rootTransformLayer; | 331 OwnPtr<GraphicsLayer> m_rootTransformLayer; |
332 | 332 |
333 CompositingReasonFinder m_compositingReasonFinder; | 333 CompositingReasonFinder m_compositingReasonFinder; |
334 | 334 |
335 bool m_hasAcceleratedCompositing; | 335 bool m_hasAcceleratedCompositing; |
336 bool m_showRepaintCounter; | 336 bool m_showRepaintCounter; |
337 | 337 |
338 // FIXME: This should absolutely not be mutable. | 338 // FIXME: This should absolutely not be mutable. |
339 mutable bool m_needsToRecomputeCompositingRequirements; | 339 mutable bool m_needsToRecomputeCompositingRequirements; |
(...skipping 29 matching lines...) Expand all Loading... |
369 OwnPtr<GraphicsLayer> m_layerForScrollCorner; | 369 OwnPtr<GraphicsLayer> m_layerForScrollCorner; |
370 #if USE(RUBBER_BANDING) | 370 #if USE(RUBBER_BANDING) |
371 OwnPtr<GraphicsLayer> m_layerForOverhangShadow; | 371 OwnPtr<GraphicsLayer> m_layerForOverhangShadow; |
372 #endif | 372 #endif |
373 }; | 373 }; |
374 | 374 |
375 | 375 |
376 } // namespace WebCore | 376 } // namespace WebCore |
377 | 377 |
378 #endif // RenderLayerCompositor_h | 378 #endif // RenderLayerCompositor_h |
OLD | NEW |