Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Side by Side Diff: cc/render_surface_impl.h

Issue 11308153: Migrate most of cc/ from WebKit::WebTransformationMatrix to gfx::Transform (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 setClipRect(const gfx::Rect&); 66 void setClipRect(const gfx::Rect&);
67 const gfx::Rect& clipRect() const { return m_clipRect; } 67 const gfx::Rect& clipRect() const { return m_clipRect; }
68 68
69 bool contentsChanged() const; 69 bool contentsChanged() const;
(...skipping 20 matching lines...) Expand all
90 90
91 private: 91 private:
92 LayerImpl* m_owningLayer; 92 LayerImpl* m_owningLayer;
93 93
94 // Uses this surface's space. 94 // Uses this surface's space.
95 gfx::Rect m_contentRect; 95 gfx::Rect m_contentRect;
96 bool m_surfacePropertyChanged; 96 bool m_surfacePropertyChanged;
97 97
98 float m_drawOpacity; 98 float m_drawOpacity;
99 bool m_drawOpacityIsAnimating; 99 bool m_drawOpacityIsAnimating;
100 WebKit::WebTransformationMatrix m_drawTransform; 100 gfx::Transform m_drawTransform;
101 WebKit::WebTransformationMatrix m_screenSpaceTransform; 101 gfx::Transform m_screenSpaceTransform;
102 WebKit::WebTransformationMatrix m_replicaDrawTransform; 102 gfx::Transform m_replicaDrawTransform;
103 WebKit::WebTransformationMatrix m_replicaScreenSpaceTransform; 103 gfx::Transform m_replicaScreenSpaceTransform;
104 bool m_targetSurfaceTransformsAreAnimating; 104 bool m_targetSurfaceTransformsAreAnimating;
105 bool m_screenSpaceTransformsAreAnimating; 105 bool m_screenSpaceTransformsAreAnimating;
106 106
107 // Uses the space of the surface's target surface. 107 // Uses the space of the surface's target surface.
108 gfx::Rect m_clipRect; 108 gfx::Rect m_clipRect;
109 109
110 std::vector<LayerImpl*> m_layerList; 110 std::vector<LayerImpl*> m_layerList;
111 std::vector<DelegatedRendererLayerImpl*> m_contributingDelegatedRenderPassLa yerList; 111 std::vector<DelegatedRendererLayerImpl*> m_contributingDelegatedRenderPassLa yerList;
112 112
113 // The nearest ancestor target surface that will contain the contents of thi s surface, and that is going 113 // The nearest ancestor target surface that will contain the contents of thi s surface, and that is going
114 // to move pixels within the surface (such as with a blur). This can point t o itself. 114 // to move pixels within the surface (such as with a blur). This can point t o itself.
115 RenderSurfaceImpl* m_nearestAncestorThatMovesPixels; 115 RenderSurfaceImpl* m_nearestAncestorThatMovesPixels;
116 116
117 scoped_ptr<DamageTracker> m_damageTracker; 117 scoped_ptr<DamageTracker> m_damageTracker;
118 118
119 // For LayerIteratorActions 119 // For LayerIteratorActions
120 int m_targetRenderSurfaceLayerIndexHistory; 120 int m_targetRenderSurfaceLayerIndexHistory;
121 int m_currentLayerIndexHistory; 121 int m_currentLayerIndexHistory;
122 122
123 friend struct LayerIteratorActions; 123 friend struct LayerIteratorActions;
124 124
125 DISALLOW_COPY_AND_ASSIGN(RenderSurfaceImpl); 125 DISALLOW_COPY_AND_ASSIGN(RenderSurfaceImpl);
126 }; 126 };
127 127
128 } 128 }
129 #endif // CC_RENDER_SURFACE_IMPL_H_ 129 #endif // CC_RENDER_SURFACE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698