OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CC_RENDER_SURFACE_IMPL_H_ | 5 #ifndef CC_RENDER_SURFACE_IMPL_H_ |
6 #define CC_RENDER_SURFACE_IMPL_H_ | 6 #define CC_RENDER_SURFACE_IMPL_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "cc/cc_export.h" | 10 #include "cc/cc_export.h" |
11 #include "cc/render_pass.h" | 11 #include "cc/render_pass.h" |
12 #include "cc/shared_quad_state.h" | 12 #include "cc/shared_quad_state.h" |
13 #include "ui/gfx/rect.h" | 13 #include "ui/gfx/rect.h" |
14 #include "ui/gfx/rect_f.h" | 14 #include "ui/gfx/rect_f.h" |
15 #include <public/WebTransformationMatrix.h> | 15 #include "ui/gfx/transform.h" |
16 | 16 |
17 namespace cc { | 17 namespace cc { |
18 | 18 |
19 class DamageTracker; | 19 class DamageTracker; |
20 class DelegatedRendererLayerImpl; | 20 class DelegatedRendererLayerImpl; |
21 class QuadSink; | 21 class QuadSink; |
22 class RenderPassSink; | 22 class RenderPassSink; |
23 class LayerImpl; | 23 class LayerImpl; |
24 | 24 |
25 struct AppendQuadsData; | 25 struct AppendQuadsData; |
(...skipping 13 matching lines...) Expand all Loading... |
39 | 39 |
40 float drawOpacity() const { return m_drawOpacity; } | 40 float drawOpacity() const { return m_drawOpacity; } |
41 void setDrawOpacity(float opacity) { m_drawOpacity = opacity; } | 41 void setDrawOpacity(float opacity) { m_drawOpacity = opacity; } |
42 | 42 |
43 void setNearestAncestorThatMovesPixels(RenderSurfaceImpl* surface) { m_neare
stAncestorThatMovesPixels = surface; } | 43 void setNearestAncestorThatMovesPixels(RenderSurfaceImpl* surface) { m_neare
stAncestorThatMovesPixels = surface; } |
44 const RenderSurfaceImpl* nearestAncestorThatMovesPixels() const { return m_n
earestAncestorThatMovesPixels; } | 44 const RenderSurfaceImpl* nearestAncestorThatMovesPixels() const { return m_n
earestAncestorThatMovesPixels; } |
45 | 45 |
46 bool drawOpacityIsAnimating() const { return m_drawOpacityIsAnimating; } | 46 bool drawOpacityIsAnimating() const { return m_drawOpacityIsAnimating; } |
47 void setDrawOpacityIsAnimating(bool drawOpacityIsAnimating) { m_drawOpacityI
sAnimating = drawOpacityIsAnimating; } | 47 void setDrawOpacityIsAnimating(bool drawOpacityIsAnimating) { m_drawOpacityI
sAnimating = drawOpacityIsAnimating; } |
48 | 48 |
49 void setDrawTransform(const WebKit::WebTransformationMatrix& drawTransform)
{ m_drawTransform = drawTransform; } | 49 void setDrawTransform(const gfx::Transform& drawTransform) { m_drawTransform
= drawTransform; } |
50 const WebKit::WebTransformationMatrix& drawTransform() const { return m_draw
Transform; } | 50 const gfx::Transform& drawTransform() const { return m_drawTransform; } |
51 | 51 |
52 void setScreenSpaceTransform(const WebKit::WebTransformationMatrix& screenSp
aceTransform) { m_screenSpaceTransform = screenSpaceTransform; } | 52 void setScreenSpaceTransform(const gfx::Transform& screenSpaceTransform) { m
_screenSpaceTransform = screenSpaceTransform; } |
53 const WebKit::WebTransformationMatrix& screenSpaceTransform() const { return
m_screenSpaceTransform; } | 53 const gfx::Transform& screenSpaceTransform() const { return m_screenSpaceTra
nsform; } |
54 | 54 |
55 void setReplicaDrawTransform(const WebKit::WebTransformationMatrix& replicaD
rawTransform) { m_replicaDrawTransform = replicaDrawTransform; } | 55 void setReplicaDrawTransform(const gfx::Transform& replicaDrawTransform) { m
_replicaDrawTransform = replicaDrawTransform; } |
56 const WebKit::WebTransformationMatrix& replicaDrawTransform() const { return
m_replicaDrawTransform; } | 56 const gfx::Transform& replicaDrawTransform() const { return m_replicaDrawTra
nsform; } |
57 | 57 |
58 void setReplicaScreenSpaceTransform(const WebKit::WebTransformationMatrix& r
eplicaScreenSpaceTransform) { m_replicaScreenSpaceTransform = replicaScreenSpace
Transform; } | 58 void setReplicaScreenSpaceTransform(const gfx::Transform& replicaScreenSpace
Transform) { m_replicaScreenSpaceTransform = replicaScreenSpaceTransform; } |
59 const WebKit::WebTransformationMatrix& replicaScreenSpaceTransform() const {
return m_replicaScreenSpaceTransform; } | 59 const gfx::Transform& replicaScreenSpaceTransform() const { return m_replica
ScreenSpaceTransform; } |
60 | 60 |
61 bool targetSurfaceTransformsAreAnimating() const { return m_targetSurfaceTra
nsformsAreAnimating; } | 61 bool targetSurfaceTransformsAreAnimating() const { return m_targetSurfaceTra
nsformsAreAnimating; } |
62 void setTargetSurfaceTransformsAreAnimating(bool animating) { m_targetSurfac
eTransformsAreAnimating = animating; } | 62 void setTargetSurfaceTransformsAreAnimating(bool animating) { m_targetSurfac
eTransformsAreAnimating = animating; } |
63 bool screenSpaceTransformsAreAnimating() const { return m_screenSpaceTransfo
rmsAreAnimating; } | 63 bool screenSpaceTransformsAreAnimating() const { return m_screenSpaceTransfo
rmsAreAnimating; } |
64 void setScreenSpaceTransformsAreAnimating(bool animating) { m_screenSpaceTra
nsformsAreAnimating = animating; } | 64 void setScreenSpaceTransformsAreAnimating(bool animating) { m_screenSpaceTra
nsformsAreAnimating = animating; } |
65 | 65 |
66 void setIsClipped(bool isClipped) { m_isClipped = isClipped; } | 66 void setIsClipped(bool isClipped) { m_isClipped = isClipped; } |
67 bool isClipped() const { return m_isClipped; } | 67 bool isClipped() const { return m_isClipped; } |
68 | 68 |
69 void setClipRect(const gfx::Rect&); | 69 void setClipRect(const gfx::Rect&); |
(...skipping 23 matching lines...) Expand all Loading... |
93 | 93 |
94 private: | 94 private: |
95 LayerImpl* m_owningLayer; | 95 LayerImpl* m_owningLayer; |
96 | 96 |
97 // Uses this surface's space. | 97 // Uses this surface's space. |
98 gfx::Rect m_contentRect; | 98 gfx::Rect m_contentRect; |
99 bool m_surfacePropertyChanged; | 99 bool m_surfacePropertyChanged; |
100 | 100 |
101 float m_drawOpacity; | 101 float m_drawOpacity; |
102 bool m_drawOpacityIsAnimating; | 102 bool m_drawOpacityIsAnimating; |
103 WebKit::WebTransformationMatrix m_drawTransform; | 103 gfx::Transform m_drawTransform; |
104 WebKit::WebTransformationMatrix m_screenSpaceTransform; | 104 gfx::Transform m_screenSpaceTransform; |
105 WebKit::WebTransformationMatrix m_replicaDrawTransform; | 105 gfx::Transform m_replicaDrawTransform; |
106 WebKit::WebTransformationMatrix m_replicaScreenSpaceTransform; | 106 gfx::Transform m_replicaScreenSpaceTransform; |
107 bool m_targetSurfaceTransformsAreAnimating; | 107 bool m_targetSurfaceTransformsAreAnimating; |
108 bool m_screenSpaceTransformsAreAnimating; | 108 bool m_screenSpaceTransformsAreAnimating; |
109 | 109 |
110 bool m_isClipped; | 110 bool m_isClipped; |
111 | 111 |
112 // Uses the space of the surface's target surface. | 112 // Uses the space of the surface's target surface. |
113 gfx::Rect m_clipRect; | 113 gfx::Rect m_clipRect; |
114 | 114 |
115 std::vector<LayerImpl*> m_layerList; | 115 std::vector<LayerImpl*> m_layerList; |
116 std::vector<DelegatedRendererLayerImpl*> m_contributingDelegatedRenderPassLa
yerList; | 116 std::vector<DelegatedRendererLayerImpl*> m_contributingDelegatedRenderPassLa
yerList; |
117 | 117 |
118 // The nearest ancestor target surface that will contain the contents of thi
s surface, and that is going | 118 // The nearest ancestor target surface that will contain the contents of thi
s surface, and that is going |
119 // to move pixels within the surface (such as with a blur). This can point t
o itself. | 119 // to move pixels within the surface (such as with a blur). This can point t
o itself. |
120 RenderSurfaceImpl* m_nearestAncestorThatMovesPixels; | 120 RenderSurfaceImpl* m_nearestAncestorThatMovesPixels; |
121 | 121 |
122 scoped_ptr<DamageTracker> m_damageTracker; | 122 scoped_ptr<DamageTracker> m_damageTracker; |
123 | 123 |
124 // For LayerIteratorActions | 124 // For LayerIteratorActions |
125 int m_targetRenderSurfaceLayerIndexHistory; | 125 int m_targetRenderSurfaceLayerIndexHistory; |
126 int m_currentLayerIndexHistory; | 126 int m_currentLayerIndexHistory; |
127 | 127 |
128 friend struct LayerIteratorActions; | 128 friend struct LayerIteratorActions; |
129 | 129 |
130 DISALLOW_COPY_AND_ASSIGN(RenderSurfaceImpl); | 130 DISALLOW_COPY_AND_ASSIGN(RenderSurfaceImpl); |
131 }; | 131 }; |
132 | 132 |
133 } | 133 } |
134 #endif // CC_RENDER_SURFACE_IMPL_H_ | 134 #endif // CC_RENDER_SURFACE_IMPL_H_ |
OLD | NEW |