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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 GraphicsLayer* ancestorClippingLayer() const { return m_ancestorClippingLaye
r.get(); } | 100 GraphicsLayer* ancestorClippingLayer() const { return m_ancestorClippingLaye
r.get(); } |
101 | 101 |
102 GraphicsLayer* foregroundLayer() const { return m_foregroundLayer.get(); } | 102 GraphicsLayer* foregroundLayer() const { return m_foregroundLayer.get(); } |
103 | 103 |
104 GraphicsLayer* backgroundLayer() const { return m_backgroundLayer.get(); } | 104 GraphicsLayer* backgroundLayer() const { return m_backgroundLayer.get(); } |
105 bool backgroundLayerPaintsFixedRootBackground() const { return m_backgroundL
ayerPaintsFixedRootBackground; } | 105 bool backgroundLayerPaintsFixedRootBackground() const { return m_backgroundL
ayerPaintsFixedRootBackground; } |
106 | 106 |
107 bool hasScrollingLayer() const { return m_scrollingLayer; } | 107 bool hasScrollingLayer() const { return m_scrollingLayer; } |
108 GraphicsLayer* scrollingLayer() const { return m_scrollingLayer.get(); } | 108 GraphicsLayer* scrollingLayer() const { return m_scrollingLayer.get(); } |
109 GraphicsLayer* scrollingContentsLayer() const { return m_scrollingContentsLa
yer.get(); } | 109 GraphicsLayer* scrollingContentsLayer() const { return m_scrollingContentsLa
yer.get(); } |
110 GraphicsLayer* scrollingBlockSelectionLayer() const { return m_scrollingBloc
kSelectionLayer.get(); } | |
111 | 110 |
112 bool hasMaskLayer() const { return m_maskLayer; } | 111 bool hasMaskLayer() const { return m_maskLayer; } |
113 GraphicsLayer* maskLayer() const { return m_maskLayer.get(); } | 112 GraphicsLayer* maskLayer() const { return m_maskLayer.get(); } |
114 | 113 |
115 bool hasChildClippingMaskLayer() const { return m_childClippingMaskLayer; } | 114 bool hasChildClippingMaskLayer() const { return m_childClippingMaskLayer; } |
116 GraphicsLayer* childClippingMaskLayer() const { return m_childClippingMaskLa
yer.get(); } | 115 GraphicsLayer* childClippingMaskLayer() const { return m_childClippingMaskLa
yer.get(); } |
117 | 116 |
118 GraphicsLayer* parentForSublayers() const; | 117 GraphicsLayer* parentForSublayers() const; |
119 GraphicsLayer* childForSuperlayers() const; | 118 GraphicsLayer* childForSuperlayers() const; |
120 void setSublayers(const GraphicsLayerVector&); | 119 void setSublayers(const GraphicsLayerVector&); |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 | 321 |
323 PaintLayer& m_owningLayer; | 322 PaintLayer& m_owningLayer; |
324 | 323 |
325 // The hierarchy of layers that is maintained by the CompositedLayerMapping
looks like this: | 324 // The hierarchy of layers that is maintained by the CompositedLayerMapping
looks like this: |
326 // | 325 // |
327 // + m_ancestorClippingLayer [OPTIONAL] | 326 // + m_ancestorClippingLayer [OPTIONAL] |
328 // + m_graphicsLayer | 327 // + m_graphicsLayer |
329 // + m_childTransformLayer [OPTIONAL] | 328 // + m_childTransformLayer [OPTIONAL] |
330 // | + m_childContainmentLayer [OPTIONAL] <-OR-> m_scrollingLayer [OPTI
ONAL] | 329 // | + m_childContainmentLayer [OPTIONAL] <-OR-> m_scrollingLayer [OPTI
ONAL] |
331 // | + m_scrollingContentsL
ayer [Present iff m_scrollingLayer is present] | 330 // | + m_scrollingContentsL
ayer [Present iff m_scrollingLayer is present] |
332 // | + m_scrollingBlockSe
lectionLayer [Present iff m_scrollingLayer is present] | |
333 // + m_overflowControlsAncestorClippingLayer [OPTIONAL] // *The overflo
w controls may need to be repositioned in the | 331 // + m_overflowControlsAncestorClippingLayer [OPTIONAL] // *The overflo
w controls may need to be repositioned in the |
334 // + m_overflowControlsHostLayer [OPTIONAL] // graphics la
yer tree by the RLC to ensure that they stack | 332 // + m_overflowControlsHostLayer [OPTIONAL] // graphics la
yer tree by the RLC to ensure that they stack |
335 // + m_layerForVerticalScrollbar [OPTIONAL] // above scrol
ling content. | 333 // + m_layerForVerticalScrollbar [OPTIONAL] // above scrol
ling content. |
336 // + m_layerForHorizontalScrollbar [OPTIONAL] | 334 // + m_layerForHorizontalScrollbar [OPTIONAL] |
337 // + m_layerForScrollCorner [OPTIONAL] | 335 // + m_layerForScrollCorner [OPTIONAL] |
338 // | 336 // |
339 // We need an ancestor clipping layer if our clipping ancestor is not our an
cestor in the | 337 // We need an ancestor clipping layer if our clipping ancestor is not our an
cestor in the |
340 // clipping tree. Here's what that might look like. | 338 // clipping tree. Here's what that might look like. |
341 // | 339 // |
342 // Let A = the clipping ancestor, | 340 // Let A = the clipping ancestor, |
(...skipping 12 matching lines...) Expand all Loading... |
355 // | 353 // |
356 // In this case B is clipped by another layer that doesn't happen to be its
ancestor: A. | 354 // In this case B is clipped by another layer that doesn't happen to be its
ancestor: A. |
357 // So we create an ancestor clipping layer for B, [+], which ensures that B
is clipped | 355 // So we create an ancestor clipping layer for B, [+], which ensures that B
is clipped |
358 // as if it had been A's descendant. | 356 // as if it had been A's descendant. |
359 OwnPtr<GraphicsLayer> m_ancestorClippingLayer; // Only used if we are clippe
d by an ancestor which is not a stacking context. | 357 OwnPtr<GraphicsLayer> m_ancestorClippingLayer; // Only used if we are clippe
d by an ancestor which is not a stacking context. |
360 OwnPtr<GraphicsLayer> m_graphicsLayer; | 358 OwnPtr<GraphicsLayer> m_graphicsLayer; |
361 OwnPtr<GraphicsLayer> m_childContainmentLayer; // Only used if we have clipp
ing on a stacking context with compositing children. | 359 OwnPtr<GraphicsLayer> m_childContainmentLayer; // Only used if we have clipp
ing on a stacking context with compositing children. |
362 OwnPtr<GraphicsLayer> m_childTransformLayer; // Only used if we have perspec
tive. | 360 OwnPtr<GraphicsLayer> m_childTransformLayer; // Only used if we have perspec
tive. |
363 OwnPtr<GraphicsLayer> m_scrollingLayer; // Only used if the layer is using c
omposited scrolling. | 361 OwnPtr<GraphicsLayer> m_scrollingLayer; // Only used if the layer is using c
omposited scrolling. |
364 OwnPtr<GraphicsLayer> m_scrollingContentsLayer; // Only used if the layer is
using composited scrolling. | 362 OwnPtr<GraphicsLayer> m_scrollingContentsLayer; // Only used if the layer is
using composited scrolling. |
365 OwnPtr<GraphicsLayer> m_scrollingBlockSelectionLayer; // Only used if the la
yer is using composited scrolling, but has no scrolling contents apart from bloc
k selection gaps. | |
366 | 363 |
367 // This layer is also added to the hierarchy by the RLB, but in a different
way than | 364 // This layer is also added to the hierarchy by the RLB, but in a different
way than |
368 // the layers above. It's added to m_graphicsLayer as its mask layer (natura
lly) if | 365 // the layers above. It's added to m_graphicsLayer as its mask layer (natura
lly) if |
369 // we have a mask, and isn't part of the typical hierarchy (it has no childr
en). | 366 // we have a mask, and isn't part of the typical hierarchy (it has no childr
en). |
370 OwnPtr<GraphicsLayer> m_maskLayer; // Only used if we have a mask. | 367 OwnPtr<GraphicsLayer> m_maskLayer; // Only used if we have a mask. |
371 OwnPtr<GraphicsLayer> m_childClippingMaskLayer; // Only used if we have to c
lip child layers or accelerated contents with border radius or clip-path. | 368 OwnPtr<GraphicsLayer> m_childClippingMaskLayer; // Only used if we have to c
lip child layers or accelerated contents with border radius or clip-path. |
372 | 369 |
373 // There are two other (optional) layers whose painting is managed by the Co
mpositedLayerMapping, | 370 // There are two other (optional) layers whose painting is managed by the Co
mpositedLayerMapping, |
374 // but whose position in the hierarchy is maintained by the PaintLayerCompos
itor. These | 371 // but whose position in the hierarchy is maintained by the PaintLayerCompos
itor. These |
375 // are the foreground and background layers. The foreground layer exists if
we have composited | 372 // are the foreground and background layers. The foreground layer exists if
we have composited |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 | 440 |
444 unsigned m_backgroundLayerPaintsFixedRootBackground : 1; | 441 unsigned m_backgroundLayerPaintsFixedRootBackground : 1; |
445 unsigned m_scrollingContentsAreEmpty : 1; | 442 unsigned m_scrollingContentsAreEmpty : 1; |
446 | 443 |
447 friend class CompositedLayerMappingTest; | 444 friend class CompositedLayerMappingTest; |
448 }; | 445 }; |
449 | 446 |
450 } // namespace blink | 447 } // namespace blink |
451 | 448 |
452 #endif // CompositedLayerMapping_h | 449 #endif // CompositedLayerMapping_h |
OLD | NEW |