| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 }; | 65 }; |
| 66 typedef unsigned UpdateAfterLayoutFlags; | 66 typedef unsigned UpdateAfterLayoutFlags; |
| 67 void updateAfterLayout(UpdateAfterLayoutFlags); | 67 void updateAfterLayout(UpdateAfterLayoutFlags); |
| 68 | 68 |
| 69 // Returns true if layer configuration changed. | 69 // Returns true if layer configuration changed. |
| 70 bool updateGraphicsLayerConfiguration(); | 70 bool updateGraphicsLayerConfiguration(); |
| 71 // Update graphics layer position and bounds. | 71 // Update graphics layer position and bounds. |
| 72 void updateGraphicsLayerGeometry(); // make private | 72 void updateGraphicsLayerGeometry(); // make private |
| 73 // Update contents and clipping structure. | 73 // Update contents and clipping structure. |
| 74 void updateDrawsContent(); | 74 void updateDrawsContent(); |
| 75 | 75 // Update whether layer needs blending. |
| 76 void updateContentsOpaque(); |
| 77 |
| 76 GraphicsLayer* graphicsLayer() const { return m_graphicsLayer.get(); } | 78 GraphicsLayer* graphicsLayer() const { return m_graphicsLayer.get(); } |
| 77 | 79 |
| 78 // Layer to clip children | 80 // Layer to clip children |
| 79 bool hasClippingLayer() const { return m_childContainmentLayer; } | 81 bool hasClippingLayer() const { return m_childContainmentLayer; } |
| 80 GraphicsLayer* clippingLayer() const { return m_childContainmentLayer.get();
} | 82 GraphicsLayer* clippingLayer() const { return m_childContainmentLayer.get();
} |
| 81 | 83 |
| 82 // Layer to get clipped by ancestor | 84 // Layer to get clipped by ancestor |
| 83 bool hasAncestorClippingLayer() const { return m_ancestorClippingLayer != 0;
} | 85 bool hasAncestorClippingLayer() const { return m_ancestorClippingLayer != 0;
} |
| 84 GraphicsLayer* ancestorClippingLayer() const { return m_ancestorClippingLaye
r.get(); } | 86 GraphicsLayer* ancestorClippingLayer() const { return m_ancestorClippingLaye
r.get(); } |
| 85 | 87 |
| 86 GraphicsLayer* contentsContainmentLayer() const { return m_contentsContainme
ntLayer.get(); } | 88 GraphicsLayer* contentsContainmentLayer() const { return m_contentsContainme
ntLayer.get(); } |
| 87 | 89 |
| 88 bool hasContentsLayer() const { return m_foregroundLayer != 0; } | 90 bool hasContentsLayer() const { return m_foregroundLayer != 0; } |
| 89 GraphicsLayer* foregroundLayer() const { return m_foregroundLayer.get(); } | 91 GraphicsLayer* foregroundLayer() const { return m_foregroundLayer.get(); } |
| 90 | 92 |
| 91 GraphicsLayer* backgroundLayer() const { return m_backgroundLayer.get(); } | 93 GraphicsLayer* backgroundLayer() const { return m_backgroundLayer.get(); } |
| 92 bool backgroundLayerPaintsFixedRootBackground() const { return m_backgroundL
ayerPaintsFixedRootBackground; } | 94 bool backgroundLayerPaintsFixedRootBackground() const { return m_backgroundL
ayerPaintsFixedRootBackground; } |
| 93 | 95 |
| 94 bool hasScrollingLayer() const { return m_scrollingLayer; } | 96 bool hasScrollingLayer() const { return m_scrollingLayer; } |
| 95 GraphicsLayer* scrollingLayer() const { return m_scrollingLayer.get(); } | 97 GraphicsLayer* scrollingLayer() const { return m_scrollingLayer.get(); } |
| 96 GraphicsLayer* scrollingContentsLayer() const { return m_scrollingContentsLa
yer.get(); } | 98 GraphicsLayer* scrollingContentsLayer() const { return m_scrollingContentsLa
yer.get(); } |
| 97 | 99 |
| 98 bool hasMaskLayer() const { return m_maskLayer != 0; } | 100 bool hasMaskLayer() const { return m_maskLayer != 0; } |
| 99 | 101 |
| 100 GraphicsLayer* parentForSublayers() const; | 102 GraphicsLayer* parentForSublayers() const; |
| 101 GraphicsLayer* childForSuperlayers() const; | 103 GraphicsLayer* childForSuperlayers() const; |
| 102 | 104 |
| 103 // RenderLayers with backing normally short-circuit paintLayer() because | |
| 104 // their content is rendered via callbacks from GraphicsLayer. However, the
document | |
| 105 // layer is special, because it has a GraphicsLayer to act as a container fo
r the GraphicsLayers | |
| 106 // for descendants, but its contents usually render into the window (in whic
h case this returns true). | |
| 107 // This returns false for other layers, and when the document layer actually
needs to paint into its backing store | |
| 108 // for some reason. | |
| 109 bool paintsIntoWindow() const; | |
| 110 | |
| 111 // Returns true for a composited layer that has no backing store of its own,
so | 105 // Returns true for a composited layer that has no backing store of its own,
so |
| 112 // paints into some ancestor layer. | 106 // paints into some ancestor layer. |
| 113 bool paintsIntoCompositedAncestor() const { return !m_requiresOwnBackingStor
e; } | 107 bool paintsIntoCompositedAncestor() const { return !m_requiresOwnBackingStor
e; } |
| 114 | 108 |
| 115 void setRequiresOwnBackingStore(bool); | 109 void setRequiresOwnBackingStore(bool); |
| 116 | 110 |
| 117 void setContentsNeedDisplay(); | 111 void setContentsNeedDisplay(); |
| 118 // r is in the coordinate space of the layer's render object | 112 // r is in the coordinate space of the layer's render object |
| 119 void setContentsNeedDisplayInRect(const IntRect&); | 113 void setContentsNeedDisplayInRect(const IntRect&); |
| 120 | 114 |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 bool m_boundsConstrainedByClipping; | 263 bool m_boundsConstrainedByClipping; |
| 270 bool m_isMainFrameRenderViewLayer; | 264 bool m_isMainFrameRenderViewLayer; |
| 271 bool m_requiresOwnBackingStore; | 265 bool m_requiresOwnBackingStore; |
| 272 bool m_canCompositeFilters; | 266 bool m_canCompositeFilters; |
| 273 bool m_backgroundLayerPaintsFixedRootBackground; | 267 bool m_backgroundLayerPaintsFixedRootBackground; |
| 274 }; | 268 }; |
| 275 | 269 |
| 276 } // namespace WebCore | 270 } // namespace WebCore |
| 277 | 271 |
| 278 #endif // RenderLayerBacking_h | 272 #endif // RenderLayerBacking_h |
| OLD | NEW |