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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 public: | 80 public: |
81 explicit CompositedLayerMapping(RenderLayer&); | 81 explicit CompositedLayerMapping(RenderLayer&); |
82 virtual ~CompositedLayerMapping(); | 82 virtual ~CompositedLayerMapping(); |
83 | 83 |
84 RenderLayer& owningLayer() const { return m_owningLayer; } | 84 RenderLayer& owningLayer() const { return m_owningLayer; } |
85 | 85 |
86 // Returns true if layer configuration changed. | 86 // Returns true if layer configuration changed. |
87 bool updateGraphicsLayerConfiguration(GraphicsLayerUpdater::UpdateType); | 87 bool updateGraphicsLayerConfiguration(GraphicsLayerUpdater::UpdateType); |
88 // Update graphics layer position and bounds. | 88 // Update graphics layer position and bounds. |
89 | 89 |
90 void updateGraphicsLayerGeometry(GraphicsLayerUpdater::UpdateType, const Ren
derLayer* compositingContainer); | 90 void updateGraphicsLayerGeometry(GraphicsLayerUpdater::UpdateType, const Ren
derLayer* compositingContainer, Vector<RenderLayer*>& layersNeedingPaintInvalida
tion); |
91 | 91 |
92 // Update whether layer needs blending. | 92 // Update whether layer needs blending. |
93 void updateContentsOpaque(); | 93 void updateContentsOpaque(); |
94 | 94 |
95 GraphicsLayer* mainGraphicsLayer() const { return m_graphicsLayer.get(); } | 95 GraphicsLayer* mainGraphicsLayer() const { return m_graphicsLayer.get(); } |
96 | 96 |
97 // Layer to clip children | 97 // Layer to clip children |
98 bool hasClippingLayer() const { return m_childContainmentLayer; } | 98 bool hasClippingLayer() const { return m_childContainmentLayer; } |
99 GraphicsLayer* clippingLayer() const { return m_childContainmentLayer.get();
} | 99 GraphicsLayer* clippingLayer() const { return m_childContainmentLayer.get();
} |
100 | 100 |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 // If there is a squashed layer painting into this CLM that is an ancestor o
f the given RenderObject, return it. Otherwise return 0. | 210 // If there is a squashed layer painting into this CLM that is an ancestor o
f the given RenderObject, return it. Otherwise return 0. |
211 const GraphicsLayerPaintInfo* containingSquashedLayer(const RenderObject*); | 211 const GraphicsLayerPaintInfo* containingSquashedLayer(const RenderObject*); |
212 | 212 |
213 void updateScrollingBlockSelection(); | 213 void updateScrollingBlockSelection(); |
214 | 214 |
215 private: | 215 private: |
216 static const GraphicsLayerPaintInfo* containingSquashedLayer(const RenderObj
ect*, const Vector<GraphicsLayerPaintInfo>& layers); | 216 static const GraphicsLayerPaintInfo* containingSquashedLayer(const RenderObj
ect*, const Vector<GraphicsLayerPaintInfo>& layers); |
217 | 217 |
218 // Helper methods to updateGraphicsLayerGeometry: | 218 // Helper methods to updateGraphicsLayerGeometry: |
219 void computeGraphicsLayerParentLocation(const RenderLayer* compositingContai
ner, const IntRect& ancestorCompositingBounds, IntPoint& graphicsLayerParentLoca
tion); | 219 void computeGraphicsLayerParentLocation(const RenderLayer* compositingContai
ner, const IntRect& ancestorCompositingBounds, IntPoint& graphicsLayerParentLoca
tion); |
220 void updateSquashingLayerGeometry(const LayoutPoint& offsetFromCompositedAnc
estor, const IntPoint& graphicsLayerParentLocation, const RenderLayer& reference
Layer, Vector<GraphicsLayerPaintInfo>& layers, GraphicsLayer*, LayoutPoint* offs
etFromTransformedAncestor); | 220 void updateSquashingLayerGeometry(const LayoutPoint& offsetFromCompositedAnc
estor, const IntPoint& graphicsLayerParentLocation, const RenderLayer& reference
Layer, Vector<GraphicsLayerPaintInfo>& layers, GraphicsLayer*, LayoutPoint* offs
etFromTransformedAncestor, Vector<RenderLayer*>& layersNeedingPaintInvalidation)
; |
221 void updateMainGraphicsLayerGeometry(const IntRect& relativeCompositingBound
s, const IntRect& localCompositingBounds, IntPoint& graphicsLayerParentLocation)
; | 221 void updateMainGraphicsLayerGeometry(const IntRect& relativeCompositingBound
s, const IntRect& localCompositingBounds, IntPoint& graphicsLayerParentLocation)
; |
222 void updateAncestorClippingLayerGeometry(const RenderLayer* compositingConta
iner, const IntPoint& snappedOffsetFromCompositedAncestor, IntPoint& graphicsLay
erParentLocation); | 222 void updateAncestorClippingLayerGeometry(const RenderLayer* compositingConta
iner, const IntPoint& snappedOffsetFromCompositedAncestor, IntPoint& graphicsLay
erParentLocation); |
223 void updateChildContainmentLayerGeometry(const IntRect& clippingBox, const I
ntRect& localCompositingBounds); | 223 void updateChildContainmentLayerGeometry(const IntRect& clippingBox, const I
ntRect& localCompositingBounds); |
224 void updateChildTransformLayerGeometry(); | 224 void updateChildTransformLayerGeometry(); |
225 void updateMaskLayerGeometry(); | 225 void updateMaskLayerGeometry(); |
226 void updateTransformGeometry(const IntPoint& snappedOffsetFromCompositedAnce
stor, const IntRect& relativeCompositingBounds); | 226 void updateTransformGeometry(const IntPoint& snappedOffsetFromCompositedAnce
stor, const IntRect& relativeCompositingBounds); |
227 void updateForegroundLayerGeometry(const FloatSize& relativeCompositingBound
sSize, const IntRect& clippingBox); | 227 void updateForegroundLayerGeometry(const FloatSize& relativeCompositingBound
sSize, const IntRect& clippingBox); |
228 void updateBackgroundLayerGeometry(const FloatSize& relativeCompositingBound
sSize); | 228 void updateBackgroundLayerGeometry(const FloatSize& relativeCompositingBound
sSize); |
229 void updateReflectionLayerGeometry(); | 229 void updateReflectionLayerGeometry(Vector<RenderLayer*>& layersNeedingPaintI
nvalidation); |
230 void updateScrollingLayerGeometry(const IntRect& localCompositingBounds); | 230 void updateScrollingLayerGeometry(const IntRect& localCompositingBounds); |
231 void updateChildClippingMaskLayerGeometry(); | 231 void updateChildClippingMaskLayerGeometry(); |
232 | 232 |
233 void createPrimaryGraphicsLayer(); | 233 void createPrimaryGraphicsLayer(); |
234 void destroyGraphicsLayers(); | 234 void destroyGraphicsLayers(); |
235 | 235 |
236 PassOwnPtr<GraphicsLayer> createGraphicsLayer(CompositingReasons); | 236 PassOwnPtr<GraphicsLayer> createGraphicsLayer(CompositingReasons); |
237 bool toggleScrollbarLayerIfNeeded(OwnPtr<GraphicsLayer>&, bool needsLayer, C
ompositingReasons); | 237 bool toggleScrollbarLayerIfNeeded(OwnPtr<GraphicsLayer>&, bool needsLayer, C
ompositingReasons); |
238 | 238 |
239 RenderLayerModelObject* renderer() const { return m_owningLayer.renderer();
} | 239 RenderLayerModelObject* renderer() const { return m_owningLayer.renderer();
} |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 bool m_canCompositeFilters : 1; | 404 bool m_canCompositeFilters : 1; |
405 bool m_backgroundLayerPaintsFixedRootBackground : 1; | 405 bool m_backgroundLayerPaintsFixedRootBackground : 1; |
406 bool m_needToUpdateGraphicsLayer : 1; | 406 bool m_needToUpdateGraphicsLayer : 1; |
407 bool m_needToUpdateGraphicsLayerOfAllDecendants : 1; | 407 bool m_needToUpdateGraphicsLayerOfAllDecendants : 1; |
408 bool m_scrollingContentsAreEmpty : 1; | 408 bool m_scrollingContentsAreEmpty : 1; |
409 }; | 409 }; |
410 | 410 |
411 } // namespace WebCore | 411 } // namespace WebCore |
412 | 412 |
413 #endif // CompositedLayerMapping_h | 413 #endif // CompositedLayerMapping_h |
OLD | NEW |