| 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 // Return an estimate of the backing store area (in pixels) allocated by thi
s object's GraphicsLayers. | 173 // Return an estimate of the backing store area (in pixels) allocated by thi
s object's GraphicsLayers. |
| 174 double backingStoreMemoryEstimate() const; | 174 double backingStoreMemoryEstimate() const; |
| 175 | 175 |
| 176 void setBlendMode(BlendMode); | 176 void setBlendMode(BlendMode); |
| 177 void reportMemoryUsage(MemoryObjectInfo*) const; | 177 void reportMemoryUsage(MemoryObjectInfo*) const; |
| 178 | 178 |
| 179 private: | 179 private: |
| 180 void createPrimaryGraphicsLayer(); | 180 void createPrimaryGraphicsLayer(); |
| 181 void destroyGraphicsLayers(); | 181 void destroyGraphicsLayers(); |
| 182 | 182 |
| 183 PassOwnPtr<GraphicsLayer> createGraphicsLayer(const String&); | 183 PassOwnPtr<GraphicsLayer> createGraphicsLayer(const String& name, Compositin
gReasons); |
| 184 | 184 |
| 185 RenderLayerModelObject* renderer() const { return m_owningLayer->renderer();
} | 185 RenderLayerModelObject* renderer() const { return m_owningLayer->renderer();
} |
| 186 RenderLayerCompositor* compositor() const { return m_owningLayer->compositor
(); } | 186 RenderLayerCompositor* compositor() const { return m_owningLayer->compositor
(); } |
| 187 | 187 |
| 188 void updateInternalHierarchy(); | 188 void updateInternalHierarchy(); |
| 189 bool updateClippingLayers(bool needsAncestorClip, bool needsDescendantClip); | 189 bool updateClippingLayers(bool needsAncestorClip, bool needsDescendantClip); |
| 190 bool updateOverflowControlsLayers(bool needsHorizontalScrollbarLayer, bool n
eedsVerticalScrollbarLayer, bool needsScrollCornerLayer); | 190 bool updateOverflowControlsLayers(bool needsHorizontalScrollbarLayer, bool n
eedsVerticalScrollbarLayer, bool needsScrollCornerLayer); |
| 191 bool updateForegroundLayer(bool needsForegroundLayer); | 191 bool updateForegroundLayer(bool needsForegroundLayer); |
| 192 bool updateBackgroundLayer(bool needsBackgroundLayer); | 192 bool updateBackgroundLayer(bool needsBackgroundLayer); |
| 193 bool updateMaskLayer(bool needsMaskLayer); | 193 bool updateMaskLayer(bool needsMaskLayer); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 // Returns true if this layer has content that needs to be rendered by paint
ing into the backing store. | 226 // Returns true if this layer has content that needs to be rendered by paint
ing into the backing store. |
| 227 bool containsPaintedContent() const; | 227 bool containsPaintedContent() const; |
| 228 // Returns true if the RenderLayer just contains an image that we can compos
ite directly. | 228 // Returns true if the RenderLayer just contains an image that we can compos
ite directly. |
| 229 bool isDirectlyCompositedImage() const; | 229 bool isDirectlyCompositedImage() const; |
| 230 void updateImageContents(); | 230 void updateImageContents(); |
| 231 | 231 |
| 232 Color rendererBackgroundColor() const; | 232 Color rendererBackgroundColor() const; |
| 233 void updateBackgroundColor(bool isSimpleContainer); | 233 void updateBackgroundColor(bool isSimpleContainer); |
| 234 void updateContentsRect(bool isSimpleContainer); | 234 void updateContentsRect(bool isSimpleContainer); |
| 235 | 235 |
| 236 void updateCompositingReasons(); |
| 237 |
| 236 bool hasVisibleNonCompositingDescendantLayers() const; | 238 bool hasVisibleNonCompositingDescendantLayers() const; |
| 237 | 239 |
| 238 bool shouldClipCompositedBounds() const; | 240 bool shouldClipCompositedBounds() const; |
| 239 | 241 |
| 240 void paintIntoLayer(const GraphicsLayer*, GraphicsContext*, const IntRect& p
aintDirtyRect, PaintBehavior, GraphicsLayerPaintingPhase); | 242 void paintIntoLayer(const GraphicsLayer*, GraphicsContext*, const IntRect& p
aintDirtyRect, PaintBehavior, GraphicsLayerPaintingPhase); |
| 241 | 243 |
| 242 static CSSPropertyID graphicsLayerToCSSProperty(AnimatedPropertyID); | 244 static CSSPropertyID graphicsLayerToCSSProperty(AnimatedPropertyID); |
| 243 static AnimatedPropertyID cssToGraphicsLayerProperty(CSSPropertyID); | 245 static AnimatedPropertyID cssToGraphicsLayerProperty(CSSPropertyID); |
| 244 | 246 |
| 245 RenderLayer* m_owningLayer; | 247 RenderLayer* m_owningLayer; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 267 bool m_boundsConstrainedByClipping; | 269 bool m_boundsConstrainedByClipping; |
| 268 bool m_isMainFrameRenderViewLayer; | 270 bool m_isMainFrameRenderViewLayer; |
| 269 bool m_requiresOwnBackingStore; | 271 bool m_requiresOwnBackingStore; |
| 270 bool m_canCompositeFilters; | 272 bool m_canCompositeFilters; |
| 271 bool m_backgroundLayerPaintsFixedRootBackground; | 273 bool m_backgroundLayerPaintsFixedRootBackground; |
| 272 }; | 274 }; |
| 273 | 275 |
| 274 } // namespace WebCore | 276 } // namespace WebCore |
| 275 | 277 |
| 276 #endif // RenderLayerBacking_h | 278 #endif // RenderLayerBacking_h |
| OLD | NEW |