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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 // A GraphicsLayerPaintInfo contains all the info needed to paint a partial subt
ree of RenderLayers into a GraphicsLayer. | 42 // A GraphicsLayerPaintInfo contains all the info needed to paint a partial subt
ree of RenderLayers into a GraphicsLayer. |
43 struct GraphicsLayerPaintInfo { | 43 struct GraphicsLayerPaintInfo { |
44 RenderLayer* renderLayer; | 44 RenderLayer* renderLayer; |
45 | 45 |
46 LayoutRect compositedBounds; | 46 LayoutRect compositedBounds; |
47 | 47 |
48 // At first, the m_squashingLayer's bounds/location are not known. The value
offsetFromSquashingCLM is | 48 // At first, the m_squashingLayer's bounds/location are not known. The value
offsetFromSquashingCLM is |
49 // an intermediate offset for a squashed RenderLayer, described with respect
to the CompositedLayerMapping's | 49 // an intermediate offset for a squashed RenderLayer, described with respect
to the CompositedLayerMapping's |
50 // owning layer that would eventually have the m_squashingLayer. Once the sh
ared GraphicsLayer's bounds are | 50 // owning layer that would eventually have the m_squashingLayer. Once the sh
ared GraphicsLayer's bounds are |
51 // known, then we can trivially convert this offset to m_squashingLayer's sp
ace. | 51 // known, then we can trivially convert this offset to m_squashingLayer's sp
ace. |
52 IntSize offsetFromSquashingCLM; | 52 LayoutSize offsetFromSquashingCLM; |
53 | 53 |
54 // Offset describing where this squashed RenderLayer paints into the shared
GraphicsLayer backing. | 54 // Offset describing where this squashed RenderLayer paints into the shared
GraphicsLayer backing. |
55 IntSize offsetFromRenderer; | 55 IntSize offsetFromRenderer; |
| 56 LayoutSize subpixelAccumulation; |
56 | 57 |
57 GraphicsLayerPaintingPhase paintingPhase; | 58 GraphicsLayerPaintingPhase paintingPhase; |
58 | 59 |
59 bool isBackgroundLayer; | 60 bool isBackgroundLayer; |
60 | 61 |
61 bool isEquivalentForSquashing(const GraphicsLayerPaintInfo& other) | 62 bool isEquivalentForSquashing(const GraphicsLayerPaintInfo& other) |
62 { | 63 { |
63 // FIXME: offsetFromRenderer and compositedBounds should not be checked
here, because | 64 // FIXME: offsetFromRenderer and compositedBounds should not be checked
here, because |
64 // they are not yet fixed at the time this function is used. | 65 // they are not yet fixed at the time this function is used. |
65 return renderLayer == other.renderLayer | 66 return renderLayer == other.renderLayer |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 LayoutRect compositedBounds() const { return m_compositedBounds; } | 161 LayoutRect compositedBounds() const { return m_compositedBounds; } |
161 IntRect pixelSnappedCompositedBounds() const; | 162 IntRect pixelSnappedCompositedBounds() const; |
162 void setCompositedBounds(const LayoutRect&); | 163 void setCompositedBounds(const LayoutRect&); |
163 void updateCompositedBounds(); | 164 void updateCompositedBounds(); |
164 | 165 |
165 void updateAfterWidgetResize(); | 166 void updateAfterWidgetResize(); |
166 void positionOverflowControlsLayers(const IntSize& offsetFromRoot); | 167 void positionOverflowControlsLayers(const IntSize& offsetFromRoot); |
167 bool hasUnpositionedOverflowControlsLayers() const; | 168 bool hasUnpositionedOverflowControlsLayers() const; |
168 | 169 |
169 // Returns true if the assignment actually changed the assigned squashing la
yer. | 170 // Returns true if the assignment actually changed the assigned squashing la
yer. |
170 bool updateSquashingLayerAssignment(RenderLayer*, IntSize offsetFromSquashin
gCLM, size_t nextSquashedLayerIndex); | 171 bool updateSquashingLayerAssignment(RenderLayer*, LayoutSize offsetFromSquas
hingCLM, size_t nextSquashedLayerIndex); |
171 void removeRenderLayerFromSquashingGraphicsLayer(const RenderLayer*); | 172 void removeRenderLayerFromSquashingGraphicsLayer(const RenderLayer*); |
172 | 173 |
173 void finishAccumulatingSquashingLayers(size_t nextSquashedLayerIndex); | 174 void finishAccumulatingSquashingLayers(size_t nextSquashedLayerIndex); |
174 void updateRenderingContext(); | 175 void updateRenderingContext(); |
175 void updateShouldFlattenTransform(); | 176 void updateShouldFlattenTransform(); |
176 | 177 |
177 // GraphicsLayerClient interface | 178 // GraphicsLayerClient interface |
178 virtual void notifyAnimationStarted(const GraphicsLayer*, double monotonicTi
me) OVERRIDE; | 179 virtual void notifyAnimationStarted(const GraphicsLayer*, double monotonicTi
me) OVERRIDE; |
179 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL
ayerPaintingPhase, const IntRect& clip) OVERRIDE; | 180 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL
ayerPaintingPhase, const IntRect& clip) OVERRIDE; |
180 virtual bool isTrackingRepaints() const OVERRIDE; | 181 virtual bool isTrackingRepaints() const OVERRIDE; |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 bool m_requiresOwnBackingStoreForAncestorReasons : 1; | 362 bool m_requiresOwnBackingStoreForAncestorReasons : 1; |
362 bool m_canCompositeFilters : 1; | 363 bool m_canCompositeFilters : 1; |
363 bool m_backgroundLayerPaintsFixedRootBackground : 1; | 364 bool m_backgroundLayerPaintsFixedRootBackground : 1; |
364 bool m_needToUpdateGeometry : 1; | 365 bool m_needToUpdateGeometry : 1; |
365 bool m_needToUpdateGeometryOfAllDecendants : 1; | 366 bool m_needToUpdateGeometryOfAllDecendants : 1; |
366 }; | 367 }; |
367 | 368 |
368 } // namespace WebCore | 369 } // namespace WebCore |
369 | 370 |
370 #endif // CompositedLayerMapping_h | 371 #endif // CompositedLayerMapping_h |
OLD | NEW |