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 RemoveFromSquashingLayer | 55 RemoveFromSquashingLayer |
56 }; | 56 }; |
57 | 57 |
58 // RenderLayerCompositor manages the hierarchy of | 58 // RenderLayerCompositor manages the hierarchy of |
59 // composited RenderLayers. It determines which RenderLayers | 59 // composited RenderLayers. It determines which RenderLayers |
60 // become compositing, and creates and maintains a hierarchy of | 60 // become compositing, and creates and maintains a hierarchy of |
61 // GraphicsLayers based on the RenderLayer painting order. | 61 // GraphicsLayers based on the RenderLayer painting order. |
62 // | 62 // |
63 // There is one RenderLayerCompositor per RenderView. | 63 // There is one RenderLayerCompositor per RenderView. |
64 | 64 |
65 class RenderLayerCompositor FINAL : public GraphicsLayerClient { | 65 class RenderLayerCompositor final : public GraphicsLayerClient { |
66 WTF_MAKE_FAST_ALLOCATED; | 66 WTF_MAKE_FAST_ALLOCATED; |
67 public: | 67 public: |
68 explicit RenderLayerCompositor(RenderView&); | 68 explicit RenderLayerCompositor(RenderView&); |
69 virtual ~RenderLayerCompositor(); | 69 virtual ~RenderLayerCompositor(); |
70 | 70 |
71 void updateIfNeededRecursive(); | 71 void updateIfNeededRecursive(); |
72 | 72 |
73 // Return true if this RenderView is in "compositing mode" (i.e. has one or
more | 73 // Return true if this RenderView is in "compositing mode" (i.e. has one or
more |
74 // composited RenderLayers) | 74 // composited RenderLayers) |
75 bool inCompositingMode() const; | 75 bool inCompositingMode() const; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 | 147 |
148 String layerTreeAsText(LayerTreeFlags); | 148 String layerTreeAsText(LayerTreeFlags); |
149 | 149 |
150 GraphicsLayer* layerForHorizontalScrollbar() const { return m_layerForHorizo
ntalScrollbar.get(); } | 150 GraphicsLayer* layerForHorizontalScrollbar() const { return m_layerForHorizo
ntalScrollbar.get(); } |
151 GraphicsLayer* layerForVerticalScrollbar() const { return m_layerForVertical
Scrollbar.get(); } | 151 GraphicsLayer* layerForVerticalScrollbar() const { return m_layerForVertical
Scrollbar.get(); } |
152 GraphicsLayer* layerForScrollCorner() const { return m_layerForScrollCorner.
get(); } | 152 GraphicsLayer* layerForScrollCorner() const { return m_layerForScrollCorner.
get(); } |
153 | 153 |
154 void resetTrackedPaintInvalidationRects(); | 154 void resetTrackedPaintInvalidationRects(); |
155 void setTracksPaintInvalidations(bool); | 155 void setTracksPaintInvalidations(bool); |
156 | 156 |
157 virtual String debugName(const GraphicsLayer*) OVERRIDE; | 157 virtual String debugName(const GraphicsLayer*) override; |
158 DocumentLifecycle& lifecycle() const; | 158 DocumentLifecycle& lifecycle() const; |
159 | 159 |
160 void updatePotentialCompositingReasonsFromStyle(RenderLayer*); | 160 void updatePotentialCompositingReasonsFromStyle(RenderLayer*); |
161 | 161 |
162 // Whether the layer could ever be composited. | 162 // Whether the layer could ever be composited. |
163 bool canBeComposited(const RenderLayer*) const; | 163 bool canBeComposited(const RenderLayer*) const; |
164 | 164 |
165 // FIXME: Move allocateOrClearCompositedLayerMapping to CompositingLayerAssi
gner once we've fixed | 165 // FIXME: Move allocateOrClearCompositedLayerMapping to CompositingLayerAssi
gner once we've fixed |
166 // the compositing chicken/egg issues. | 166 // the compositing chicken/egg issues. |
167 bool allocateOrClearCompositedLayerMapping(RenderLayer*, CompositingStateTra
nsitionType compositedLayerUpdate); | 167 bool allocateOrClearCompositedLayerMapping(RenderLayer*, CompositingStateTra
nsitionType compositedLayerUpdate); |
168 | 168 |
169 void updateDirectCompositingReasons(RenderLayer*); | 169 void updateDirectCompositingReasons(RenderLayer*); |
170 | 170 |
171 void setOverlayLayer(GraphicsLayer*); | 171 void setOverlayLayer(GraphicsLayer*); |
172 | 172 |
173 bool inOverlayFullscreenVideo() const { return m_inOverlayFullscreenVideo; } | 173 bool inOverlayFullscreenVideo() const { return m_inOverlayFullscreenVideo; } |
174 | 174 |
175 private: | 175 private: |
176 #if ENABLE(ASSERT) | 176 #if ENABLE(ASSERT) |
177 void assertNoUnresolvedDirtyBits(); | 177 void assertNoUnresolvedDirtyBits(); |
178 #endif | 178 #endif |
179 | 179 |
180 // GraphicsLayerClient implementation | 180 // GraphicsLayerClient implementation |
181 virtual void notifyAnimationStarted(const GraphicsLayer*, double) OVERRIDE {
} | 181 virtual void notifyAnimationStarted(const GraphicsLayer*, double) override {
} |
182 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL
ayerPaintingPhase, const IntRect&) OVERRIDE; | 182 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL
ayerPaintingPhase, const IntRect&) override; |
183 | 183 |
184 virtual bool isTrackingPaintInvalidations() const OVERRIDE; | 184 virtual bool isTrackingPaintInvalidations() const override; |
185 | 185 |
186 void updateWithoutAcceleratedCompositing(CompositingUpdateType); | 186 void updateWithoutAcceleratedCompositing(CompositingUpdateType); |
187 void updateIfNeeded(); | 187 void updateIfNeeded(); |
188 | 188 |
189 void ensureRootLayer(); | 189 void ensureRootLayer(); |
190 void destroyRootLayer(); | 190 void destroyRootLayer(); |
191 | 191 |
192 void attachRootLayer(RootLayerAttachment); | 192 void attachRootLayer(RootLayerAttachment); |
193 void detachRootLayer(); | 193 void detachRootLayer(); |
194 | 194 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 #if USE(RUBBER_BANDING) | 245 #if USE(RUBBER_BANDING) |
246 OwnPtr<GraphicsLayer> m_layerForOverhangShadow; | 246 OwnPtr<GraphicsLayer> m_layerForOverhangShadow; |
247 #endif | 247 #endif |
248 | 248 |
249 bool m_inOverlayFullscreenVideo; | 249 bool m_inOverlayFullscreenVideo; |
250 }; | 250 }; |
251 | 251 |
252 } // namespace blink | 252 } // namespace blink |
253 | 253 |
254 #endif // RenderLayerCompositor_h | 254 #endif // RenderLayerCompositor_h |
OLD | NEW |