OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010, 2011 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 bool isBackgroundLayer; | 66 bool isBackgroundLayer; |
67 }; | 67 }; |
68 | 68 |
69 // CompositedLayerMapping keeps track of how RenderLayers of the render tree cor
respond to | 69 // CompositedLayerMapping keeps track of how RenderLayers of the render tree cor
respond to |
70 // GraphicsLayers of the composited layer tree. Each instance of CompositedLayer
Mapping | 70 // GraphicsLayers of the composited layer tree. Each instance of CompositedLayer
Mapping |
71 // manages a small cluster of GraphicsLayers and the references to which RenderL
ayers | 71 // manages a small cluster of GraphicsLayers and the references to which RenderL
ayers |
72 // and paint phases contribute to each GraphicsLayer. | 72 // and paint phases contribute to each GraphicsLayer. |
73 // | 73 // |
74 // Currently (Oct. 2013) there is one CompositedLayerMapping for each RenderLaye
r, | 74 // Currently (Oct. 2013) there is one CompositedLayerMapping for each RenderLaye
r, |
75 // but this is likely to evolve soon. | 75 // but this is likely to evolve soon. |
76 class CompositedLayerMapping : public GraphicsLayerClient { | 76 class CompositedLayerMapping FINAL : public GraphicsLayerClient { |
77 WTF_MAKE_NONCOPYABLE(CompositedLayerMapping); WTF_MAKE_FAST_ALLOCATED; | 77 WTF_MAKE_NONCOPYABLE(CompositedLayerMapping); WTF_MAKE_FAST_ALLOCATED; |
78 public: | 78 public: |
79 explicit CompositedLayerMapping(RenderLayer*); | 79 explicit CompositedLayerMapping(RenderLayer*); |
80 ~CompositedLayerMapping(); | 80 ~CompositedLayerMapping(); |
81 | 81 |
82 RenderLayer* owningLayer() const { return m_owningLayer; } | 82 RenderLayer* owningLayer() const { return m_owningLayer; } |
83 | 83 |
84 enum UpdateAfterLayoutFlag { | 84 enum UpdateAfterLayoutFlag { |
85 CompositingChildrenOnly = 1 << 0, | 85 CompositingChildrenOnly = 1 << 0, |
86 NeedsFullRepaint = 1 << 1, | 86 NeedsFullRepaint = 1 << 1, |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 void finishAccumulatingSquashingLayers(size_t nextSquashedLayerIndex); | 166 void finishAccumulatingSquashingLayers(size_t nextSquashedLayerIndex); |
167 | 167 |
168 // GraphicsLayerClient interface | 168 // GraphicsLayerClient interface |
169 virtual void notifyAnimationStarted(const GraphicsLayer*, double wallClockTi
me, double monotonicTime) OVERRIDE; | 169 virtual void notifyAnimationStarted(const GraphicsLayer*, double wallClockTi
me, double monotonicTime) OVERRIDE; |
170 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL
ayerPaintingPhase, const IntRect& clip) OVERRIDE; | 170 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL
ayerPaintingPhase, const IntRect& clip) OVERRIDE; |
171 virtual bool isTrackingRepaints() const OVERRIDE; | 171 virtual bool isTrackingRepaints() const OVERRIDE; |
172 | 172 |
173 PassOwnPtr<Vector<FloatRect> > collectTrackedRepaintRects() const; | 173 PassOwnPtr<Vector<FloatRect> > collectTrackedRepaintRects() const; |
174 | 174 |
175 #ifndef NDEBUG | 175 #ifndef NDEBUG |
176 virtual void verifyNotPainting(); | 176 virtual void verifyNotPainting() OVERRIDE; |
177 #endif | 177 #endif |
178 | 178 |
179 LayoutRect contentsBox() const; | 179 LayoutRect contentsBox() const; |
180 IntRect backgroundBox() const; | 180 IntRect backgroundBox() const; |
181 | 181 |
182 // For informative purposes only. | 182 // For informative purposes only. |
183 CompositingLayerType compositingLayerType() const; | 183 CompositingLayerType compositingLayerType() const; |
184 | 184 |
185 GraphicsLayer* layerForHorizontalScrollbar() const { return m_layerForHorizo
ntalScrollbar.get(); } | 185 GraphicsLayer* layerForHorizontalScrollbar() const { return m_layerForHorizo
ntalScrollbar.get(); } |
186 GraphicsLayer* layerForVerticalScrollbar() const { return m_layerForVertical
Scrollbar.get(); } | 186 GraphicsLayer* layerForVerticalScrollbar() const { return m_layerForVertical
Scrollbar.get(); } |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 bool m_isMainFrameRenderViewLayer; | 352 bool m_isMainFrameRenderViewLayer; |
353 bool m_requiresOwnBackingStoreForIntrinsicReasons; | 353 bool m_requiresOwnBackingStoreForIntrinsicReasons; |
354 bool m_requiresOwnBackingStoreForAncestorReasons; | 354 bool m_requiresOwnBackingStoreForAncestorReasons; |
355 bool m_canCompositeFilters; | 355 bool m_canCompositeFilters; |
356 bool m_backgroundLayerPaintsFixedRootBackground; | 356 bool m_backgroundLayerPaintsFixedRootBackground; |
357 }; | 357 }; |
358 | 358 |
359 } // namespace WebCore | 359 } // namespace WebCore |
360 | 360 |
361 #endif // CompositedLayerMapping_h | 361 #endif // CompositedLayerMapping_h |
OLD | NEW |