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

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

Issue 12760011: cc: Chromify LayerTreeHostCommon (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « cc/layers/contents_scaling_layer_unittest.cc ('k') | cc/layers/layer_iterator_unittest.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_LAYER_ITERATOR_H_ 5 #ifndef CC_LAYERS_LAYER_ITERATOR_H_
6 #define CC_LAYERS_LAYER_ITERATOR_H_ 6 #define CC_LAYERS_LAYER_ITERATOR_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "cc/base/cc_export.h" 9 #include "cc/base/cc_export.h"
10 #include "cc/trees/layer_tree_host_common.h" 10 #include "cc/trees/layer_tree_host_common.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 inline static LayerImpl* get_raw_ptr(LayerImpl* ptr) { return ptr; } 196 inline static LayerImpl* get_raw_ptr(LayerImpl* ptr) { return ptr; }
197 197
198 inline LayerType* current_layer() const { 198 inline LayerType* current_layer() const {
199 return current_layer_represents_target_render_surface() 199 return current_layer_represents_target_render_surface()
200 ? target_render_surface_layer() 200 ? target_render_surface_layer()
201 : get_raw_ptr( 201 : get_raw_ptr(
202 target_render_surface_children()[current_layer_index_]); 202 target_render_surface_children()[current_layer_index_]);
203 } 203 }
204 204
205 inline bool current_layer_represents_contributing_render_surface() const { 205 inline bool current_layer_represents_contributing_render_surface() const {
206 return LayerTreeHostCommon::renderSurfaceContributesToTarget<LayerType>( 206 return LayerTreeHostCommon::RenderSurfaceContributesToTarget<LayerType>(
207 current_layer(), target_render_surface_layer()->id()); 207 current_layer(), target_render_surface_layer()->id());
208 } 208 }
209 inline bool current_layer_represents_target_render_surface() const { 209 inline bool current_layer_represents_target_render_surface() const {
210 return current_layer_index_ == 210 return current_layer_index_ ==
211 LayerIteratorValue::kLayerIndexRepresentingTargetRenderSurface; 211 LayerIteratorValue::kLayerIndexRepresentingTargetRenderSurface;
212 } 212 }
213 213
214 inline RenderSurfaceType* target_render_surface() const { 214 inline RenderSurfaceType* target_render_surface() const {
215 return target_render_surface_layer()->render_surface(); 215 return target_render_surface_layer()->render_surface();
216 } 216 }
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 typename RenderSurfaceType, 301 typename RenderSurfaceType,
302 typename ActionType> 302 typename ActionType>
303 void GoToHighestInSubtree( 303 void GoToHighestInSubtree(
304 LayerIterator<LayerType, LayerList, RenderSurfaceType, ActionType>* it); 304 LayerIterator<LayerType, LayerList, RenderSurfaceType, ActionType>* it);
305 }; 305 };
306 }; 306 };
307 307
308 } // namespace cc 308 } // namespace cc
309 309
310 #endif // CC_LAYERS_LAYER_ITERATOR_H_ 310 #endif // CC_LAYERS_LAYER_ITERATOR_H_
OLDNEW
« no previous file with comments | « cc/layers/contents_scaling_layer_unittest.cc ('k') | cc/layers/layer_iterator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698