| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 GraphicsLayer* foregroundLayer() const { return m_foregroundLayer.get(); } | 91 GraphicsLayer* foregroundLayer() const { return m_foregroundLayer.get(); } |
| 92 | 92 |
| 93 GraphicsLayer* backgroundLayer() const { return m_backgroundLayer.get(); } | 93 GraphicsLayer* backgroundLayer() const { return m_backgroundLayer.get(); } |
| 94 bool backgroundLayerPaintsFixedRootBackground() const { return m_backgroundL
ayerPaintsFixedRootBackground; } | 94 bool backgroundLayerPaintsFixedRootBackground() const { return m_backgroundL
ayerPaintsFixedRootBackground; } |
| 95 | 95 |
| 96 bool hasScrollingLayer() const { return m_scrollingLayer; } | 96 bool hasScrollingLayer() const { return m_scrollingLayer; } |
| 97 GraphicsLayer* scrollingLayer() const { return m_scrollingLayer.get(); } | 97 GraphicsLayer* scrollingLayer() const { return m_scrollingLayer.get(); } |
| 98 GraphicsLayer* scrollingContentsLayer() const { return m_scrollingContentsLa
yer.get(); } | 98 GraphicsLayer* scrollingContentsLayer() const { return m_scrollingContentsLa
yer.get(); } |
| 99 | 99 |
| 100 bool hasMaskLayer() const { return m_maskLayer != 0; } | 100 bool hasMaskLayer() const { return m_maskLayer != 0; } |
| 101 bool hasBorderRadiusLayer() const { return m_borderRadiusLayer; } |
| 101 | 102 |
| 102 GraphicsLayer* parentForSublayers() const; | 103 GraphicsLayer* parentForSublayers() const; |
| 103 GraphicsLayer* childForSuperlayers() const; | 104 GraphicsLayer* childForSuperlayers() const; |
| 104 | 105 |
| 105 // Returns true for a composited layer that has no backing store of its own,
so | 106 // Returns true for a composited layer that has no backing store of its own,
so |
| 106 // paints into some ancestor layer. | 107 // paints into some ancestor layer. |
| 107 bool paintsIntoCompositedAncestor() const { return !m_requiresOwnBackingStor
e; } | 108 bool paintsIntoCompositedAncestor() const { return !m_requiresOwnBackingStor
e; } |
| 108 | 109 |
| 109 void setRequiresOwnBackingStore(bool); | 110 void setRequiresOwnBackingStore(bool); |
| 110 | 111 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 179 |
| 179 RenderLayerModelObject* renderer() const { return m_owningLayer->renderer();
} | 180 RenderLayerModelObject* renderer() const { return m_owningLayer->renderer();
} |
| 180 RenderLayerCompositor* compositor() const { return m_owningLayer->compositor
(); } | 181 RenderLayerCompositor* compositor() const { return m_owningLayer->compositor
(); } |
| 181 | 182 |
| 182 void updateInternalHierarchy(); | 183 void updateInternalHierarchy(); |
| 183 bool updateClippingLayers(bool needsAncestorClip, bool needsDescendantClip); | 184 bool updateClippingLayers(bool needsAncestorClip, bool needsDescendantClip); |
| 184 bool updateOverflowControlsLayers(bool needsHorizontalScrollbarLayer, bool n
eedsVerticalScrollbarLayer, bool needsScrollCornerLayer); | 185 bool updateOverflowControlsLayers(bool needsHorizontalScrollbarLayer, bool n
eedsVerticalScrollbarLayer, bool needsScrollCornerLayer); |
| 185 bool updateForegroundLayer(bool needsForegroundLayer); | 186 bool updateForegroundLayer(bool needsForegroundLayer); |
| 186 bool updateBackgroundLayer(bool needsBackgroundLayer); | 187 bool updateBackgroundLayer(bool needsBackgroundLayer); |
| 187 bool updateMaskLayer(bool needsMaskLayer); | 188 bool updateMaskLayer(bool needsMaskLayer); |
| 189 bool updateBorderRadiusLayer(bool needsBorderRadiusLayer); |
| 188 bool requiresHorizontalScrollbarLayer() const { return m_owningLayer->horizo
ntalScrollbar(); } | 190 bool requiresHorizontalScrollbarLayer() const { return m_owningLayer->horizo
ntalScrollbar(); } |
| 189 bool requiresVerticalScrollbarLayer() const { return m_owningLayer->vertical
Scrollbar(); } | 191 bool requiresVerticalScrollbarLayer() const { return m_owningLayer->vertical
Scrollbar(); } |
| 190 bool requiresScrollCornerLayer() const { return !m_owningLayer->scrollCorner
AndResizerRect().isEmpty(); } | 192 bool requiresScrollCornerLayer() const { return !m_owningLayer->scrollCorner
AndResizerRect().isEmpty(); } |
| 191 bool updateScrollingLayers(bool scrollingLayers); | 193 bool updateScrollingLayers(bool scrollingLayers); |
| 192 void updateDrawsContent(bool isSimpleContainer); | 194 void updateDrawsContent(bool isSimpleContainer); |
| 193 void registerScrollingLayers(); | 195 void registerScrollingLayers(); |
| 194 | 196 |
| 195 void updateRootLayerConfiguration(); | 197 void updateRootLayerConfiguration(); |
| 196 | 198 |
| 197 void setBackgroundLayerPaintsFixedRootBackground(bool); | 199 void setBackgroundLayerPaintsFixedRootBackground(bool); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 | 242 |
| 241 RenderLayer* m_owningLayer; | 243 RenderLayer* m_owningLayer; |
| 242 | 244 |
| 243 OwnPtr<GraphicsLayer> m_ancestorClippingLayer; // Only used if we are clippe
d by an ancestor which is not a stacking context. | 245 OwnPtr<GraphicsLayer> m_ancestorClippingLayer; // Only used if we are clippe
d by an ancestor which is not a stacking context. |
| 244 OwnPtr<GraphicsLayer> m_contentsContainmentLayer; // Only used if we have a
background layer; takes the transform. | 246 OwnPtr<GraphicsLayer> m_contentsContainmentLayer; // Only used if we have a
background layer; takes the transform. |
| 245 OwnPtr<GraphicsLayer> m_graphicsLayer; | 247 OwnPtr<GraphicsLayer> m_graphicsLayer; |
| 246 OwnPtr<GraphicsLayer> m_foregroundLayer; // Only used in cases where we need
to draw the foreground separately. | 248 OwnPtr<GraphicsLayer> m_foregroundLayer; // Only used in cases where we need
to draw the foreground separately. |
| 247 OwnPtr<GraphicsLayer> m_backgroundLayer; // Only used in cases where we need
to draw the background separately. | 249 OwnPtr<GraphicsLayer> m_backgroundLayer; // Only used in cases where we need
to draw the background separately. |
| 248 OwnPtr<GraphicsLayer> m_childContainmentLayer; // Only used if we have clipp
ing on a stacking context with compositing children, or if the layer has a tile
cache. | 250 OwnPtr<GraphicsLayer> m_childContainmentLayer; // Only used if we have clipp
ing on a stacking context with compositing children, or if the layer has a tile
cache. |
| 249 OwnPtr<GraphicsLayer> m_maskLayer; // Only used if we have a mask. | 251 OwnPtr<GraphicsLayer> m_maskLayer; // Only used if we have a mask. |
| 252 OwnPtr<GraphicsLayer> m_borderRadiusLayer; // Only used if we have rounded b
order on canvas, video or embedded objects. |
| 250 | 253 |
| 251 OwnPtr<GraphicsLayer> m_layerForHorizontalScrollbar; | 254 OwnPtr<GraphicsLayer> m_layerForHorizontalScrollbar; |
| 252 OwnPtr<GraphicsLayer> m_layerForVerticalScrollbar; | 255 OwnPtr<GraphicsLayer> m_layerForVerticalScrollbar; |
| 253 OwnPtr<GraphicsLayer> m_layerForScrollCorner; | 256 OwnPtr<GraphicsLayer> m_layerForScrollCorner; |
| 254 | 257 |
| 255 OwnPtr<GraphicsLayer> m_scrollingLayer; // Only used if the layer is using c
omposited scrolling. | 258 OwnPtr<GraphicsLayer> m_scrollingLayer; // Only used if the layer is using c
omposited scrolling. |
| 256 OwnPtr<GraphicsLayer> m_scrollingContentsLayer; // Only used if the layer is
using composited scrolling. | 259 OwnPtr<GraphicsLayer> m_scrollingContentsLayer; // Only used if the layer is
using composited scrolling. |
| 257 | 260 |
| 258 uint64_t m_scrollLayerID; | 261 uint64_t m_scrollLayerID; |
| 259 | 262 |
| 260 IntRect m_compositedBounds; | 263 IntRect m_compositedBounds; |
| 261 | 264 |
| 262 bool m_artificiallyInflatedBounds; // bounds had to be made non-zero to make
transform-origin work | 265 bool m_artificiallyInflatedBounds; // bounds had to be made non-zero to make
transform-origin work |
| 263 bool m_boundsConstrainedByClipping; | 266 bool m_boundsConstrainedByClipping; |
| 264 bool m_isMainFrameRenderViewLayer; | 267 bool m_isMainFrameRenderViewLayer; |
| 265 bool m_requiresOwnBackingStore; | 268 bool m_requiresOwnBackingStore; |
| 266 bool m_canCompositeFilters; | 269 bool m_canCompositeFilters; |
| 267 bool m_backgroundLayerPaintsFixedRootBackground; | 270 bool m_backgroundLayerPaintsFixedRootBackground; |
| 268 }; | 271 }; |
| 269 | 272 |
| 270 } // namespace WebCore | 273 } // namespace WebCore |
| 271 | 274 |
| 272 #endif // RenderLayerBacking_h | 275 #endif // RenderLayerBacking_h |
| OLD | NEW |