| 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 19 matching lines...) Expand all Loading... |
| 30 #include "core/platform/graphics/FloatPoint3D.h" | 30 #include "core/platform/graphics/FloatPoint3D.h" |
| 31 #include "core/platform/graphics/GraphicsLayer.h" | 31 #include "core/platform/graphics/GraphicsLayer.h" |
| 32 #include "core/platform/graphics/GraphicsLayerClient.h" | 32 #include "core/platform/graphics/GraphicsLayerClient.h" |
| 33 #include "core/platform/graphics/transforms/TransformationMatrix.h" | 33 #include "core/platform/graphics/transforms/TransformationMatrix.h" |
| 34 #include "core/rendering/RenderLayer.h" | 34 #include "core/rendering/RenderLayer.h" |
| 35 | 35 |
| 36 namespace WebCore { | 36 namespace WebCore { |
| 37 | 37 |
| 38 class KeyframeList; | 38 class KeyframeList; |
| 39 class RenderLayerCompositor; | 39 class RenderLayerCompositor; |
| 40 class WebAnimationProvider; |
| 40 | 41 |
| 41 enum CompositingLayerType { | 42 enum CompositingLayerType { |
| 42 NormalCompositingLayer, // non-tiled layer with backing store | 43 NormalCompositingLayer, // non-tiled layer with backing store |
| 43 MediaCompositingLayer, // layer that contains an image, video, webGL or plug
in | 44 MediaCompositingLayer, // layer that contains an image, video, webGL or plug
in |
| 44 ContainerCompositingLayer // layer with no backing store | 45 ContainerCompositingLayer // layer with no backing store |
| 45 }; | 46 }; |
| 46 | 47 |
| 47 | 48 |
| 48 // A GraphicsLayerPaintInfo contains all the info needed to paint a partial subt
ree of RenderLayers into a GraphicsLayer. | 49 // A GraphicsLayerPaintInfo contains all the info needed to paint a partial subt
ree of RenderLayers into a GraphicsLayer. |
| 49 struct GraphicsLayerPaintInfo { | 50 struct GraphicsLayerPaintInfo { |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 void updateContentsRect(bool isSimpleContainer); | 238 void updateContentsRect(bool isSimpleContainer); |
| 238 | 239 |
| 239 void updateCompositingReasons(); | 240 void updateCompositingReasons(); |
| 240 | 241 |
| 241 bool hasVisibleNonCompositingDescendantLayers() const; | 242 bool hasVisibleNonCompositingDescendantLayers() const; |
| 242 | 243 |
| 243 bool shouldClipCompositedBounds() const; | 244 bool shouldClipCompositedBounds() const; |
| 244 | 245 |
| 245 void doPaintTask(GraphicsLayerPaintInfo&, GraphicsContext*, const IntRect& c
lip); | 246 void doPaintTask(GraphicsLayerPaintInfo&, GraphicsContext*, const IntRect& c
lip); |
| 246 | 247 |
| 247 static CSSPropertyID graphicsLayerToCSSProperty(AnimatedPropertyID); | |
| 248 static AnimatedPropertyID cssToGraphicsLayerProperty(CSSPropertyID); | |
| 249 | |
| 250 RenderLayer* m_owningLayer; | 248 RenderLayer* m_owningLayer; |
| 251 | 249 |
| 252 // The hierarchy of layers that is maintained by the RenderLayerBacking look
s like this: | 250 // The hierarchy of layers that is maintained by the RenderLayerBacking look
s like this: |
| 253 // | 251 // |
| 254 // + m_ancestorClippingLayer [OPTIONAL] | 252 // + m_ancestorClippingLayer [OPTIONAL] |
| 255 // + m_graphicsLayer | 253 // + m_graphicsLayer |
| 256 // + m_childContainmentLayer [OPTIONAL] <-OR-> m_scrollingLayer [OPTI
ONAL] | 254 // + m_childContainmentLayer [OPTIONAL] <-OR-> m_scrollingLayer [OPTI
ONAL] |
| 257 // + m_scrollingContents
Layer [OPTIONAL] | 255 // + m_scrollingContents
Layer [OPTIONAL] |
| 258 // | 256 // |
| 259 // We need an ancestor clipping layer if our clipping ancestor is not our an
cestor in the | 257 // We need an ancestor clipping layer if our clipping ancestor is not our an
cestor in the |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 // | 307 // |
| 310 // With the hierarchy set up like this, the root content layer is able to sc
roll without affecting | 308 // With the hierarchy set up like this, the root content layer is able to sc
roll without affecting |
| 311 // the background layer (or repainting). | 309 // the background layer (or repainting). |
| 312 OwnPtr<GraphicsLayer> m_foregroundLayer; // Only used in cases where we need
to draw the foreground separately. | 310 OwnPtr<GraphicsLayer> m_foregroundLayer; // Only used in cases where we need
to draw the foreground separately. |
| 313 OwnPtr<GraphicsLayer> m_backgroundLayer; // Only used in cases where we need
to draw the background separately. | 311 OwnPtr<GraphicsLayer> m_backgroundLayer; // Only used in cases where we need
to draw the background separately. |
| 314 | 312 |
| 315 OwnPtr<GraphicsLayer> m_layerForHorizontalScrollbar; | 313 OwnPtr<GraphicsLayer> m_layerForHorizontalScrollbar; |
| 316 OwnPtr<GraphicsLayer> m_layerForVerticalScrollbar; | 314 OwnPtr<GraphicsLayer> m_layerForVerticalScrollbar; |
| 317 OwnPtr<GraphicsLayer> m_layerForScrollCorner; | 315 OwnPtr<GraphicsLayer> m_layerForScrollCorner; |
| 318 | 316 |
| 317 OwnPtr<WebAnimationProvider> m_animationProvider; |
| 318 |
| 319 IntRect m_compositedBounds; | 319 IntRect m_compositedBounds; |
| 320 | 320 |
| 321 bool m_artificiallyInflatedBounds; // bounds had to be made non-zero to make
transform-origin work | 321 bool m_artificiallyInflatedBounds; // bounds had to be made non-zero to make
transform-origin work |
| 322 bool m_boundsConstrainedByClipping; | 322 bool m_boundsConstrainedByClipping; |
| 323 bool m_isMainFrameRenderViewLayer; | 323 bool m_isMainFrameRenderViewLayer; |
| 324 bool m_requiresOwnBackingStore; | 324 bool m_requiresOwnBackingStore; |
| 325 bool m_canCompositeFilters; | 325 bool m_canCompositeFilters; |
| 326 bool m_backgroundLayerPaintsFixedRootBackground; | 326 bool m_backgroundLayerPaintsFixedRootBackground; |
| 327 }; | 327 }; |
| 328 | 328 |
| 329 } // namespace WebCore | 329 } // namespace WebCore |
| 330 | 330 |
| 331 #endif // RenderLayerBacking_h | 331 #endif // RenderLayerBacking_h |
| OLD | NEW |