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

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

Issue 643583003: [C++11 Allowed Features] Declares a type-safe null pointer converting from NULL to nullptr in src/… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: foramted. Created 6 years, 2 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
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // An iterator class for walking over layers in the 101 // An iterator class for walking over layers in the
102 // RenderSurface-Layer tree. 102 // RenderSurface-Layer tree.
103 template <typename LayerType> 103 template <typename LayerType>
104 class LayerIterator { 104 class LayerIterator {
105 typedef LayerIterator<LayerType> LayerIteratorType; 105 typedef LayerIterator<LayerType> LayerIteratorType;
106 typedef typename LayerType::LayerListType LayerList; 106 typedef typename LayerType::LayerListType LayerList;
107 typedef typename LayerType::RenderSurfaceListType RenderSurfaceLayerList; 107 typedef typename LayerType::RenderSurfaceListType RenderSurfaceLayerList;
108 typedef typename LayerType::RenderSurfaceType RenderSurfaceType; 108 typedef typename LayerType::RenderSurfaceType RenderSurfaceType;
109 109
110 public: 110 public:
111 LayerIterator() : render_surface_layer_list_(NULL) {} 111 LayerIterator() : render_surface_layer_list_(nullptr) {}
112 112
113 static LayerIteratorType Begin( 113 static LayerIteratorType Begin(
114 const RenderSurfaceLayerList* render_surface_layer_list) { 114 const RenderSurfaceLayerList* render_surface_layer_list) {
115 return LayerIteratorType(render_surface_layer_list, true); 115 return LayerIteratorType(render_surface_layer_list, true);
116 } 116 }
117 static LayerIteratorType End( 117 static LayerIteratorType End(
118 const RenderSurfaceLayerList* render_surface_layer_list) { 118 const RenderSurfaceLayerList* render_surface_layer_list) {
119 return LayerIteratorType(render_surface_layer_list, false); 119 return LayerIteratorType(render_surface_layer_list, false);
120 } 120 }
121 121
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
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

Powered by Google App Engine
This is Rietveld 408576698