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

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

Issue 256773003: Change get_child_as_raw_ptr to get_layer_as_raw_ptr (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | « no previous file | cc/trees/layer_tree_host_common.h » ('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 "cc/base/cc_export.h" 8 #include "cc/base/cc_export.h"
9 #include "cc/trees/layer_tree_host_common.h" 9 #include "cc/trees/layer_tree_host_common.h"
10 10
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 current_layer_index_ = target_render_surface_children().size() - 1; 244 current_layer_index_ = target_render_surface_children().size() - 1;
245 245
246 target_render_surface()->target_render_surface_layer_index_history_ = 246 target_render_surface()->target_render_surface_layer_index_history_ =
247 previous_target_render_surface_layer; 247 previous_target_render_surface_layer;
248 } 248 }
249 } 249 }
250 250
251 inline LayerType* current_layer() const { 251 inline LayerType* current_layer() const {
252 return current_layer_represents_target_render_surface() 252 return current_layer_represents_target_render_surface()
253 ? target_render_surface_layer() 253 ? target_render_surface_layer()
254 : LayerTreeHostCommon::get_child_as_raw_ptr( 254 : LayerTreeHostCommon::get_layer_as_raw_ptr(
255 target_render_surface_children(), current_layer_index_); 255 target_render_surface_children(), current_layer_index_);
256 } 256 }
257 257
258 inline bool current_layer_represents_contributing_render_surface() const { 258 inline bool current_layer_represents_contributing_render_surface() const {
259 return LayerTreeHostCommon::RenderSurfaceContributesToTarget<LayerType>( 259 return LayerTreeHostCommon::RenderSurfaceContributesToTarget<LayerType>(
260 current_layer(), target_render_surface_layer()->id()); 260 current_layer(), target_render_surface_layer()->id());
261 } 261 }
262 inline bool current_layer_represents_target_render_surface() const { 262 inline bool current_layer_represents_target_render_surface() const {
263 return current_layer_index_ == 263 return current_layer_index_ ==
264 LayerIteratorValue::kLayerIndexRepresentingTargetRenderSurface; 264 LayerIteratorValue::kLayerIndexRepresentingTargetRenderSurface;
(...skipping 22 matching lines...) Expand all
287 // this is a value from 0 to n-1 (n = number of children). 287 // this is a value from 0 to n-1 (n = number of children).
288 // Since the iterator must also stop at the layers representing 288 // Since the iterator must also stop at the layers representing
289 // the target surface, this is done by setting the current_layerIndex 289 // the target surface, this is done by setting the current_layerIndex
290 // to a value of LayerIteratorValue::LayerRepresentingTargetRenderSurface. 290 // to a value of LayerIteratorValue::LayerRepresentingTargetRenderSurface.
291 int current_layer_index_; 291 int current_layer_index_;
292 }; 292 };
293 293
294 } // namespace cc 294 } // namespace cc
295 295
296 #endif // CC_LAYERS_LAYER_ITERATOR_H_ 296 #endif // CC_LAYERS_LAYER_ITERATOR_H_
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698