| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 GraphicsLayer* foregroundLayer() const { return m_foregroundLayer.get(); } | 104 GraphicsLayer* foregroundLayer() const { return m_foregroundLayer.get(); } |
| 105 | 105 |
| 106 GraphicsLayer* backgroundLayer() const { return m_backgroundLayer.get(); } | 106 GraphicsLayer* backgroundLayer() const { return m_backgroundLayer.get(); } |
| 107 bool backgroundLayerPaintsFixedRootBackground() const { return m_backgroundL
ayerPaintsFixedRootBackground; } | 107 bool backgroundLayerPaintsFixedRootBackground() const { return m_backgroundL
ayerPaintsFixedRootBackground; } |
| 108 | 108 |
| 109 bool hasScrollingLayer() const { return m_scrollingLayer; } | 109 bool hasScrollingLayer() const { return m_scrollingLayer; } |
| 110 GraphicsLayer* scrollingLayer() const { return m_scrollingLayer.get(); } | 110 GraphicsLayer* scrollingLayer() const { return m_scrollingLayer.get(); } |
| 111 GraphicsLayer* scrollingContentsLayer() const { return m_scrollingContentsLa
yer.get(); } | 111 GraphicsLayer* scrollingContentsLayer() const { return m_scrollingContentsLa
yer.get(); } |
| 112 | 112 |
| 113 bool hasMaskLayer() const { return m_maskLayer != 0; } | 113 bool hasMaskLayer() const { return m_maskLayer != 0; } |
| 114 bool hasChildClippingMaskLayer() const { return m_childClippingMaskLayer; } |
| 114 | 115 |
| 115 GraphicsLayer* parentForSublayers() const; | 116 GraphicsLayer* parentForSublayers() const; |
| 116 GraphicsLayer* childForSuperlayers() const; | 117 GraphicsLayer* childForSuperlayers() const; |
| 117 | 118 |
| 118 // Returns true for a composited layer that has no backing store of its own,
so | 119 // Returns true for a composited layer that has no backing store of its own,
so |
| 119 // paints into some ancestor layer. | 120 // paints into some ancestor layer. |
| 120 bool paintsIntoCompositedAncestor() const { return !m_requiresOwnBackingStor
e; } | 121 bool paintsIntoCompositedAncestor() const { return !m_requiresOwnBackingStor
e; } |
| 121 | 122 |
| 122 void setRequiresOwnBackingStore(bool); | 123 void setRequiresOwnBackingStore(bool); |
| 123 | 124 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 | 191 |
| 191 RenderLayerModelObject* renderer() const { return m_owningLayer->renderer();
} | 192 RenderLayerModelObject* renderer() const { return m_owningLayer->renderer();
} |
| 192 RenderLayerCompositor* compositor() const { return m_owningLayer->compositor
(); } | 193 RenderLayerCompositor* compositor() const { return m_owningLayer->compositor
(); } |
| 193 | 194 |
| 194 void updateInternalHierarchy(); | 195 void updateInternalHierarchy(); |
| 195 bool updateClippingLayers(bool needsAncestorClip, bool needsDescendantClip,
bool needsScrollClip); | 196 bool updateClippingLayers(bool needsAncestorClip, bool needsDescendantClip,
bool needsScrollClip); |
| 196 bool updateOverflowControlsLayers(bool needsHorizontalScrollbarLayer, bool n
eedsVerticalScrollbarLayer, bool needsScrollCornerLayer); | 197 bool updateOverflowControlsLayers(bool needsHorizontalScrollbarLayer, bool n
eedsVerticalScrollbarLayer, bool needsScrollCornerLayer); |
| 197 bool updateForegroundLayer(bool needsForegroundLayer); | 198 bool updateForegroundLayer(bool needsForegroundLayer); |
| 198 bool updateBackgroundLayer(bool needsBackgroundLayer); | 199 bool updateBackgroundLayer(bool needsBackgroundLayer); |
| 199 bool updateMaskLayer(bool needsMaskLayer); | 200 bool updateMaskLayer(bool needsMaskLayer); |
| 201 bool updateClippingMaskLayers(bool needsChildClippingMaskLayer); |
| 200 bool requiresHorizontalScrollbarLayer() const { return m_owningLayer->horizo
ntalScrollbar(); } | 202 bool requiresHorizontalScrollbarLayer() const { return m_owningLayer->horizo
ntalScrollbar(); } |
| 201 bool requiresVerticalScrollbarLayer() const { return m_owningLayer->vertical
Scrollbar(); } | 203 bool requiresVerticalScrollbarLayer() const { return m_owningLayer->vertical
Scrollbar(); } |
| 202 bool requiresScrollCornerLayer() const { return !m_owningLayer->scrollCorner
AndResizerRect().isEmpty(); } | 204 bool requiresScrollCornerLayer() const { return !m_owningLayer->scrollCorner
AndResizerRect().isEmpty(); } |
| 203 bool updateScrollingLayers(bool scrollingLayers); | 205 bool updateScrollingLayers(bool scrollingLayers); |
| 204 void updateScrollParent(RenderLayer*); | 206 void updateScrollParent(RenderLayer*); |
| 205 void updateClipParent(RenderLayer*); | 207 void updateClipParent(RenderLayer*); |
| 206 void updateDrawsContent(bool isSimpleContainer); | 208 void updateDrawsContent(bool isSimpleContainer); |
| 207 void registerScrollingLayers(); | 209 void registerScrollingLayers(); |
| 208 | 210 |
| 209 void setBackgroundLayerPaintsFixedRootBackground(bool); | 211 void setBackgroundLayerPaintsFixedRootBackground(bool); |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 OwnPtr<GraphicsLayer> m_ancestorClippingLayer; // Only used if we are clippe
d by an ancestor which is not a stacking context. | 302 OwnPtr<GraphicsLayer> m_ancestorClippingLayer; // Only used if we are clippe
d by an ancestor which is not a stacking context. |
| 301 OwnPtr<GraphicsLayer> m_graphicsLayer; | 303 OwnPtr<GraphicsLayer> m_graphicsLayer; |
| 302 OwnPtr<GraphicsLayer> m_childContainmentLayer; // Only used if we have clipp
ing on a stacking context with compositing children. | 304 OwnPtr<GraphicsLayer> m_childContainmentLayer; // Only used if we have clipp
ing on a stacking context with compositing children. |
| 303 OwnPtr<GraphicsLayer> m_scrollingLayer; // Only used if the layer is using c
omposited scrolling. | 305 OwnPtr<GraphicsLayer> m_scrollingLayer; // Only used if the layer is using c
omposited scrolling. |
| 304 OwnPtr<GraphicsLayer> m_scrollingContentsLayer; // Only used if the layer is
using composited scrolling. | 306 OwnPtr<GraphicsLayer> m_scrollingContentsLayer; // Only used if the layer is
using composited scrolling. |
| 305 | 307 |
| 306 // This layer is also added to the hierarchy by the RLB, but in a different
way than | 308 // This layer is also added to the hierarchy by the RLB, but in a different
way than |
| 307 // the layers above. It's added to m_graphicsLayer as its mask layer (natura
lly) if | 309 // the layers above. It's added to m_graphicsLayer as its mask layer (natura
lly) if |
| 308 // we have a mask, and isn't part of the typical hierarchy (it has no childr
en). | 310 // we have a mask, and isn't part of the typical hierarchy (it has no childr
en). |
| 309 OwnPtr<GraphicsLayer> m_maskLayer; // Only used if we have a mask. | 311 OwnPtr<GraphicsLayer> m_maskLayer; // Only used if we have a mask. |
| 312 OwnPtr<GraphicsLayer> m_childClippingMaskLayer; // Only used if we have to c
lip child layers or accelerated contents with border radius or clip-path. |
| 310 | 313 |
| 311 // There are two other (optional) layers whose painting is managed by the Re
nderLayerBacking, | 314 // There are two other (optional) layers whose painting is managed by the Re
nderLayerBacking, |
| 312 // but whose position in the hierarchy is maintained by the RenderLayerCompo
sitor. These | 315 // but whose position in the hierarchy is maintained by the RenderLayerCompo
sitor. These |
| 313 // are the foreground and background layers. The foreground layer exists if
we have composited | 316 // are the foreground and background layers. The foreground layer exists if
we have composited |
| 314 // descendants with negative z-order. We need the extra layer in this case b
ecause the layer | 317 // descendants with negative z-order. We need the extra layer in this case b
ecause the layer |
| 315 // needs to draw both below (for the background, say) and above (for the nor
mal flow content, say) | 318 // needs to draw both below (for the background, say) and above (for the nor
mal flow content, say) |
| 316 // the negative z-order descendants and this is impossible with a single lay
er. The RLC handles | 319 // the negative z-order descendants and this is impossible with a single lay
er. The RLC handles |
| 317 // inserting m_foregroundLayer in the correct position in our descendant lis
t for us (right after | 320 // inserting m_foregroundLayer in the correct position in our descendant lis
t for us (right after |
| 318 // the neg z-order dsecendants). | 321 // the neg z-order dsecendants). |
| 319 // | 322 // |
| (...skipping 23 matching lines...) Expand all Loading... |
| 343 bool m_boundsConstrainedByClipping; | 346 bool m_boundsConstrainedByClipping; |
| 344 bool m_isMainFrameRenderViewLayer; | 347 bool m_isMainFrameRenderViewLayer; |
| 345 bool m_requiresOwnBackingStore; | 348 bool m_requiresOwnBackingStore; |
| 346 bool m_canCompositeFilters; | 349 bool m_canCompositeFilters; |
| 347 bool m_backgroundLayerPaintsFixedRootBackground; | 350 bool m_backgroundLayerPaintsFixedRootBackground; |
| 348 }; | 351 }; |
| 349 | 352 |
| 350 } // namespace WebCore | 353 } // namespace WebCore |
| 351 | 354 |
| 352 #endif // RenderLayerBacking_h | 355 #endif // RenderLayerBacking_h |
| OLD | NEW |