OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 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 | 30 |
31 #include "FloatPoint.h" | 31 #include "FloatPoint.h" |
32 #include "FloatPoint3D.h" | 32 #include "FloatPoint3D.h" |
33 #include "GraphicsLayer.h" | 33 #include "GraphicsLayer.h" |
34 #include "GraphicsLayerClient.h" | 34 #include "GraphicsLayerClient.h" |
35 #include "RenderLayer.h" | 35 #include "RenderLayer.h" |
36 #include "TransformationMatrix.h" | 36 #include "TransformationMatrix.h" |
37 | 37 |
38 namespace WebCore { | 38 namespace WebCore { |
39 | 39 |
40 class KeyframeList; | |
41 class RenderLayerCompositor; | 40 class RenderLayerCompositor; |
42 | 41 |
43 // RenderLayerBacking controls the compositing behavior for a single RenderLayer
. | 42 // RenderLayerBacking controls the compositing behavior for a single RenderLayer
. |
44 // It holds the various GraphicsLayers, and makes decisions about intra-layer re
ndering | 43 // It holds the various GraphicsLayers, and makes decisions about intra-layer re
ndering |
45 // optimizations. | 44 // optimizations. |
46 // | 45 // |
47 // There is one RenderLayerBacking for each RenderLayer that is composited. | 46 // There is one RenderLayerBacking for each RenderLayer that is composited. |
48 | 47 |
49 class RenderLayerBacking : public GraphicsLayerClient { | 48 class RenderLayerBacking : public GraphicsLayerClient { |
50 public: | 49 public: |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 virtual void notifyAnimationStarted(const GraphicsLayer*, double startTime); | 109 virtual void notifyAnimationStarted(const GraphicsLayer*, double startTime); |
111 | 110 |
112 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL
ayerPaintingPhase, const IntRect& clip); | 111 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL
ayerPaintingPhase, const IntRect& clip); |
113 | 112 |
114 virtual IntRect contentsBox(const GraphicsLayer*); | 113 virtual IntRect contentsBox(const GraphicsLayer*); |
115 | 114 |
116 private: | 115 private: |
117 void createGraphicsLayer(); | 116 void createGraphicsLayer(); |
118 void destroyGraphicsLayer(); | 117 void destroyGraphicsLayer(); |
119 | 118 |
120 RenderBoxModelObject* renderer() const { return m_owningLayer->renderer(); } | 119 RenderBox* renderer() const { return m_owningLayer->renderer(); } |
121 RenderLayerCompositor* compositor() const { return m_owningLayer->compositor
(); } | 120 RenderLayerCompositor* compositor() const { return m_owningLayer->compositor
(); } |
122 | 121 |
123 bool updateClippingLayers(bool needsAncestorClip, bool needsDescendantClip); | 122 bool updateClippingLayers(bool needsAncestorClip, bool needsDescendantClip); |
124 bool updateContentsLayer(bool needsContentsLayer); | 123 bool updateContentsLayer(bool needsContentsLayer); |
125 | 124 |
126 IntSize contentOffsetInCompostingLayer(); | 125 IntSize contentOffsetInCompostingLayer(); |
127 // Result is transform origin in pixels. | 126 // Result is transform origin in pixels. |
128 FloatPoint computeTransformOrigin(const IntRect& borderBox) const; | 127 FloatPoint computeTransformOrigin(const IntRect& borderBox) const; |
129 | 128 |
130 void updateLayerOpacity(); | 129 void updateLayerOpacity(); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 bool m_simpleCompositingLayerStatusDirty : 1; // set if the test for simple
layers needs to be redone | 163 bool m_simpleCompositingLayerStatusDirty : 1; // set if the test for simple
layers needs to be redone |
165 | 164 |
166 bool m_compositingContentOffsetDirty: 1; | 165 bool m_compositingContentOffsetDirty: 1; |
167 }; | 166 }; |
168 | 167 |
169 } // namespace WebCore | 168 } // namespace WebCore |
170 | 169 |
171 #endif // USE(ACCELERATED_COMPOSITING) | 170 #endif // USE(ACCELERATED_COMPOSITING) |
172 | 171 |
173 #endif // RenderLayerBacking_h | 172 #endif // RenderLayerBacking_h |
OLD | NEW |