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

Side by Side Diff: cc/layers/render_surface_impl.h

Issue 2751783002: cc: Replace LayerIterator with iterator that walks layer list and effect tree (Closed)
Patch Set: Rebase Created 3 years, 8 months 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
« no previous file with comments | « cc/layers/layer_list_iterator.h ('k') | cc/layers/render_surface_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_LAYERS_RENDER_SURFACE_IMPL_H_ 5 #ifndef CC_LAYERS_RENDER_SURFACE_IMPL_H_
6 #define CC_LAYERS_RENDER_SURFACE_IMPL_H_ 6 #define CC_LAYERS_RENDER_SURFACE_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 10 matching lines...) Expand all
21 #include "ui/gfx/geometry/rect.h" 21 #include "ui/gfx/geometry/rect.h"
22 #include "ui/gfx/geometry/rect_f.h" 22 #include "ui/gfx/geometry/rect_f.h"
23 #include "ui/gfx/transform.h" 23 #include "ui/gfx/transform.h"
24 24
25 namespace cc { 25 namespace cc {
26 26
27 class DamageTracker; 27 class DamageTracker;
28 class FilterOperations; 28 class FilterOperations;
29 class Occlusion; 29 class Occlusion;
30 class LayerImpl; 30 class LayerImpl;
31 class LayerIterator;
32 class LayerTreeImpl; 31 class LayerTreeImpl;
33 32
34 struct AppendQuadsData; 33 struct AppendQuadsData;
35 34
36 class CC_EXPORT RenderSurfaceImpl { 35 class CC_EXPORT RenderSurfaceImpl {
37 public: 36 public:
38 RenderSurfaceImpl(LayerTreeImpl* layer_tree_impl, int stable_effect_id); 37 RenderSurfaceImpl(LayerTreeImpl* layer_tree_impl, int stable_effect_id);
39 virtual ~RenderSurfaceImpl(); 38 virtual ~RenderSurfaceImpl();
40 39
41 // Returns the RenderSurfaceImpl that this render surface contributes to. Root 40 // Returns the RenderSurfaceImpl that this render surface contributes to. Root
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 void ClearLayerLists(); 123 void ClearLayerLists();
125 124
126 int id() const { return stable_effect_id_; } 125 int id() const { return stable_effect_id_; }
127 126
128 LayerImpl* MaskLayer(); 127 LayerImpl* MaskLayer();
129 bool HasMask() const; 128 bool HasMask() const;
130 129
131 const FilterOperations& Filters() const; 130 const FilterOperations& Filters() const;
132 const FilterOperations& BackgroundFilters() const; 131 const FilterOperations& BackgroundFilters() const;
133 gfx::PointF FiltersOrigin() const; 132 gfx::PointF FiltersOrigin() const;
134 gfx::Transform FiltersTransform() const; 133 gfx::Transform SurfaceScale() const;
135 134
136 bool HasCopyRequest() const; 135 bool HasCopyRequest() const;
137 136
138 void ResetPropertyChangedFlags(); 137 void ResetPropertyChangedFlags();
139 bool SurfacePropertyChanged() const; 138 bool SurfacePropertyChanged() const;
140 bool SurfacePropertyChangedOnlyFromDescendant() const; 139 bool SurfacePropertyChangedOnlyFromDescendant() const;
141 bool AncestorPropertyChanged() const; 140 bool AncestorPropertyChanged() const;
142 void NoteAncestorPropertyChanged(); 141 void NoteAncestorPropertyChanged();
143 142
144 DamageTracker* damage_tracker() const { return damage_tracker_.get(); } 143 DamageTracker* damage_tracker() const { return damage_tracker_.get(); }
145 gfx::Rect GetDamageRect(); 144 gfx::Rect GetDamageRect();
146 145
147 int GetRenderPassId(); 146 int GetRenderPassId();
148 147
149 std::unique_ptr<RenderPass> CreateRenderPass(); 148 std::unique_ptr<RenderPass> CreateRenderPass();
150 void AppendQuads(RenderPass* render_pass, AppendQuadsData* append_quads_data); 149 void AppendQuads(RenderPass* render_pass, AppendQuadsData* append_quads_data);
151 150
152 int TransformTreeIndex() const; 151 int TransformTreeIndex() const;
153 int ClipTreeIndex() const; 152 int ClipTreeIndex() const;
154 153
155 void set_effect_tree_index(int index) { effect_tree_index_ = index; } 154 void set_effect_tree_index(int index) { effect_tree_index_ = index; }
156 int EffectTreeIndex() const; 155 int EffectTreeIndex() const;
157 156
157 const EffectNode* OwningEffectNode() const;
158
158 private: 159 private:
159 void SetContentRect(const gfx::Rect& content_rect); 160 void SetContentRect(const gfx::Rect& content_rect);
160 gfx::Rect CalculateClippedAccumulatedContentRect(); 161 gfx::Rect CalculateClippedAccumulatedContentRect();
161 gfx::Rect CalculateExpandedClipForFilters( 162 gfx::Rect CalculateExpandedClipForFilters(
162 const gfx::Transform& target_to_surface); 163 const gfx::Transform& target_to_surface);
163 164
164 const EffectNode* OwningEffectNode() const;
165
166 LayerTreeImpl* layer_tree_impl_; 165 LayerTreeImpl* layer_tree_impl_;
167 int stable_effect_id_; 166 int stable_effect_id_;
168 int effect_tree_index_; 167 int effect_tree_index_;
169 168
170 // Container for properties that render surfaces need to compute before they 169 // Container for properties that render surfaces need to compute before they
171 // can be drawn. 170 // can be drawn.
172 struct DrawProperties { 171 struct DrawProperties {
173 DrawProperties(); 172 DrawProperties();
174 ~DrawProperties(); 173 ~DrawProperties();
175 174
(...skipping 26 matching lines...) Expand all
202 201
203 LayerImplList layer_list_; 202 LayerImplList layer_list_;
204 Occlusion occlusion_in_content_space_; 203 Occlusion occlusion_in_content_space_;
205 204
206 // The nearest ancestor target surface that will contain the contents of this 205 // The nearest ancestor target surface that will contain the contents of this
207 // surface, and that ignores outside occlusion. This can point to itself. 206 // surface, and that ignores outside occlusion. This can point to itself.
208 const RenderSurfaceImpl* nearest_occlusion_immune_ancestor_; 207 const RenderSurfaceImpl* nearest_occlusion_immune_ancestor_;
209 208
210 std::unique_ptr<DamageTracker> damage_tracker_; 209 std::unique_ptr<DamageTracker> damage_tracker_;
211 210
212 // For LayerIteratorActions
213 int target_render_surface_layer_index_history_;
214 size_t current_layer_index_history_;
215
216 friend class LayerIterator;
217
218 DISALLOW_COPY_AND_ASSIGN(RenderSurfaceImpl); 211 DISALLOW_COPY_AND_ASSIGN(RenderSurfaceImpl);
219 }; 212 };
220 213
221 } // namespace cc 214 } // namespace cc
222 #endif // CC_LAYERS_RENDER_SURFACE_IMPL_H_ 215 #endif // CC_LAYERS_RENDER_SURFACE_IMPL_H_
OLDNEW
« no previous file with comments | « cc/layers/layer_list_iterator.h ('k') | cc/layers/render_surface_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698