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

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

Issue 2571263002: cc: Remove map lookup from RenderSurfaceImpl::EffectTreeIndex (Closed)
Patch Set: Fix post-rebase unit test failure Created 3 years, 11 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 | « no previous file | 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 144
145 DamageTracker* damage_tracker() const { return damage_tracker_.get(); } 145 DamageTracker* damage_tracker() const { return damage_tracker_.get(); }
146 146
147 int GetRenderPassId(); 147 int GetRenderPassId();
148 148
149 void AppendRenderPasses(RenderPassSink* pass_sink); 149 void AppendRenderPasses(RenderPassSink* pass_sink);
150 void AppendQuads(RenderPass* render_pass, AppendQuadsData* append_quads_data); 150 void AppendQuads(RenderPass* render_pass, AppendQuadsData* append_quads_data);
151 151
152 int TransformTreeIndex() const; 152 int TransformTreeIndex() const;
153 int ClipTreeIndex() const; 153 int ClipTreeIndex() const;
154
155 void set_effect_tree_index(int index) { effect_tree_index_ = index; }
154 int EffectTreeIndex() const; 156 int EffectTreeIndex() const;
155 157
156 private: 158 private:
157 void SetContentRect(const gfx::Rect& content_rect); 159 void SetContentRect(const gfx::Rect& content_rect);
158 gfx::Rect CalculateClippedAccumulatedContentRect(); 160 gfx::Rect CalculateClippedAccumulatedContentRect();
159 161
160 const EffectNode* OwningEffectNode() const; 162 const EffectNode* OwningEffectNode() const;
161 163
162 LayerImpl* owning_layer_; 164 LayerImpl* owning_layer_;
163 165
164 LayerTreeImpl* layer_tree_impl_; 166 LayerTreeImpl* layer_tree_impl_;
165 int stable_effect_id_; 167 int stable_effect_id_;
168 int effect_tree_index_;
166 169
167 // Container for properties that render surfaces need to compute before they 170 // Container for properties that render surfaces need to compute before they
168 // can be drawn. 171 // can be drawn.
169 struct DrawProperties { 172 struct DrawProperties {
170 DrawProperties(); 173 DrawProperties();
171 ~DrawProperties(); 174 ~DrawProperties();
172 175
173 float draw_opacity; 176 float draw_opacity;
174 177
175 // Transforms from the surface's own space to the space of its target 178 // Transforms from the surface's own space to the space of its target
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 int target_render_surface_layer_index_history_; 213 int target_render_surface_layer_index_history_;
211 size_t current_layer_index_history_; 214 size_t current_layer_index_history_;
212 215
213 friend class LayerIterator; 216 friend class LayerIterator;
214 217
215 DISALLOW_COPY_AND_ASSIGN(RenderSurfaceImpl); 218 DISALLOW_COPY_AND_ASSIGN(RenderSurfaceImpl);
216 }; 219 };
217 220
218 } // namespace cc 221 } // namespace cc
219 #endif // CC_LAYERS_RENDER_SURFACE_IMPL_H_ 222 #endif // CC_LAYERS_RENDER_SURFACE_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layers/render_surface_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698