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 "platform/geometry/FloatPoint.h" | 30 #include "platform/geometry/FloatPoint.h" |
31 #include "platform/geometry/FloatPoint3D.h" | 31 #include "platform/geometry/FloatPoint3D.h" |
32 #include "platform/graphics/GraphicsLayer.h" | 32 #include "platform/graphics/GraphicsLayer.h" |
33 #include "platform/graphics/GraphicsLayerClient.h" | 33 #include "platform/graphics/GraphicsLayerClient.h" |
34 #include "platform/transforms/TransformationMatrix.h" | 34 #include "platform/transforms/TransformationMatrix.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; | |
41 | 40 |
42 enum CompositingLayerType { | 41 enum CompositingLayerType { |
43 NormalCompositingLayer, // non-tiled layer with backing store | 42 NormalCompositingLayer, // non-tiled layer with backing store |
44 MediaCompositingLayer, // layer that contains an image, video, webGL or plug
in | 43 MediaCompositingLayer, // layer that contains an image, video, webGL or plug
in |
45 ContainerCompositingLayer // layer with no backing store | 44 ContainerCompositingLayer // layer with no backing store |
46 }; | 45 }; |
47 | 46 |
48 | 47 |
49 // A GraphicsLayerPaintInfo contains all the info needed to paint a partial subt
ree of RenderLayers into a GraphicsLayer. | 48 // A GraphicsLayerPaintInfo contains all the info needed to paint a partial subt
ree of RenderLayers into a GraphicsLayer. |
50 struct GraphicsLayerPaintInfo { | 49 struct GraphicsLayerPaintInfo { |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 // a backing store changed. | 137 // a backing store changed. |
139 bool updateRequiresOwnBackingStoreForIntrinsicReasons(); | 138 bool updateRequiresOwnBackingStoreForIntrinsicReasons(); |
140 | 139 |
141 void setContentsNeedDisplay(); | 140 void setContentsNeedDisplay(); |
142 // r is in the coordinate space of the layer's render object | 141 // r is in the coordinate space of the layer's render object |
143 void setContentsNeedDisplayInRect(const IntRect&); | 142 void setContentsNeedDisplayInRect(const IntRect&); |
144 | 143 |
145 // Notification from the renderer that its content changed. | 144 // Notification from the renderer that its content changed. |
146 void contentChanged(ContentChangeType); | 145 void contentChanged(ContentChangeType); |
147 | 146 |
148 // Interface to start, finish, suspend and resume animations and transitions | |
149 bool startTransition(double, CSSPropertyID, const RenderStyle* fromStyle, co
nst RenderStyle* toStyle); | |
150 void transitionPaused(double timeOffset, CSSPropertyID); | |
151 void transitionFinished(CSSPropertyID); | |
152 | |
153 bool startAnimation(double timeOffset, const CSSAnimationData*, const Keyfra
meList& keyframes); | |
154 void animationPaused(double timeOffset, const String& name); | |
155 void animationFinished(const String& name); | |
156 | |
157 LayoutRect compositedBounds() const; | 147 LayoutRect compositedBounds() const; |
158 void setCompositedBounds(const LayoutRect&); | 148 void setCompositedBounds(const LayoutRect&); |
159 void updateCompositedBounds(); | 149 void updateCompositedBounds(); |
160 | 150 |
161 void updateAfterWidgetResize(); | 151 void updateAfterWidgetResize(); |
162 void positionOverflowControlsLayers(const IntSize& offsetFromRoot); | 152 void positionOverflowControlsLayers(const IntSize& offsetFromRoot); |
163 bool hasUnpositionedOverflowControlsLayers() const; | 153 bool hasUnpositionedOverflowControlsLayers() const; |
164 | 154 |
165 void addRenderLayerToSquashingGraphicsLayer(RenderLayer*, IntSize offsetFrom
SquashingCLM, size_t nextSquashedLayerIndex); | 155 void addRenderLayerToSquashingGraphicsLayer(RenderLayer*, IntSize offsetFrom
SquashingCLM, size_t nextSquashedLayerIndex); |
166 void finishAccumulatingSquashingLayers(size_t nextSquashedLayerIndex); | 156 void finishAccumulatingSquashingLayers(size_t nextSquashedLayerIndex); |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 // | 322 // |
333 // With the hierarchy set up like this, the root content layer is able to sc
roll without affecting | 323 // With the hierarchy set up like this, the root content layer is able to sc
roll without affecting |
334 // the background layer (or repainting). | 324 // the background layer (or repainting). |
335 OwnPtr<GraphicsLayer> m_foregroundLayer; // Only used in cases where we need
to draw the foreground separately. | 325 OwnPtr<GraphicsLayer> m_foregroundLayer; // Only used in cases where we need
to draw the foreground separately. |
336 OwnPtr<GraphicsLayer> m_backgroundLayer; // Only used in cases where we need
to draw the background separately. | 326 OwnPtr<GraphicsLayer> m_backgroundLayer; // Only used in cases where we need
to draw the background separately. |
337 | 327 |
338 OwnPtr<GraphicsLayer> m_layerForHorizontalScrollbar; | 328 OwnPtr<GraphicsLayer> m_layerForHorizontalScrollbar; |
339 OwnPtr<GraphicsLayer> m_layerForVerticalScrollbar; | 329 OwnPtr<GraphicsLayer> m_layerForVerticalScrollbar; |
340 OwnPtr<GraphicsLayer> m_layerForScrollCorner; | 330 OwnPtr<GraphicsLayer> m_layerForScrollCorner; |
341 | 331 |
342 OwnPtr<WebAnimationProvider> m_animationProvider; | |
343 | |
344 OwnPtr<GraphicsLayer> m_squashingContainmentLayer; // Only used if any squas
hed layers exist, to contain the squashed layers as siblings to the rest of the
GraphicsLayer tree chunk. | 332 OwnPtr<GraphicsLayer> m_squashingContainmentLayer; // Only used if any squas
hed layers exist, to contain the squashed layers as siblings to the rest of the
GraphicsLayer tree chunk. |
345 OwnPtr<GraphicsLayer> m_squashingLayer; // Only used if any squashed layers
exist, this is the backing that squashed layers paint into. | 333 OwnPtr<GraphicsLayer> m_squashingLayer; // Only used if any squashed layers
exist, this is the backing that squashed layers paint into. |
346 Vector<GraphicsLayerPaintInfo> m_squashedLayers; | 334 Vector<GraphicsLayerPaintInfo> m_squashedLayers; |
347 | 335 |
348 LayoutRect m_compositedBounds; | 336 LayoutRect m_compositedBounds; |
349 LayoutSize m_subpixelAccumulation; // The accumulated subpixel offset of the
compositedBounds compared to absolute coordinates. | 337 LayoutSize m_subpixelAccumulation; // The accumulated subpixel offset of the
compositedBounds compared to absolute coordinates. |
350 | 338 |
351 bool m_artificiallyInflatedBounds; // bounds had to be made non-zero to make
transform-origin work | 339 bool m_artificiallyInflatedBounds; // bounds had to be made non-zero to make
transform-origin work |
352 bool m_isMainFrameRenderViewLayer; | 340 bool m_isMainFrameRenderViewLayer; |
353 bool m_requiresOwnBackingStoreForIntrinsicReasons; | 341 bool m_requiresOwnBackingStoreForIntrinsicReasons; |
354 bool m_requiresOwnBackingStoreForAncestorReasons; | 342 bool m_requiresOwnBackingStoreForAncestorReasons; |
355 bool m_canCompositeFilters; | 343 bool m_canCompositeFilters; |
356 bool m_backgroundLayerPaintsFixedRootBackground; | 344 bool m_backgroundLayerPaintsFixedRootBackground; |
357 }; | 345 }; |
358 | 346 |
359 } // namespace WebCore | 347 } // namespace WebCore |
360 | 348 |
361 #endif // CompositedLayerMapping_h | 349 #endif // CompositedLayerMapping_h |
OLD | NEW |