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

Side by Side Diff: cc/resources/picture_layer_tiling_set.cc

Issue 12912010: cc: Convert non-const reference arguments to pointers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ui/compositor 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/output/software_renderer_unittest.cc ('k') | cc/resources/tile_priority.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 #include "cc/resources/picture_layer_tiling_set.h" 5 #include "cc/resources/picture_layer_tiling_set.h"
6 6
7 namespace cc { 7 namespace cc {
8 8
9 namespace { 9 namespace {
10 10
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 ++tiling_iter_; 216 ++tiling_iter_;
217 } 217 }
218 if (tiling_iter_) 218 if (tiling_iter_)
219 return *this; 219 return *this;
220 220
221 // If the set of current rects for this tiling is done, go to the next 221 // If the set of current rects for this tiling is done, go to the next
222 // tiling and set up to iterate through all of the remaining holes. 222 // tiling and set up to iterate through all of the remaining holes.
223 // This will also happen the first time through the loop. 223 // This will also happen the first time through the loop.
224 if (!region_iter_.has_rect()) { 224 if (!region_iter_.has_rect()) {
225 current_tiling_ = NextTiling(); 225 current_tiling_ = NextTiling();
226 current_region_.Swap(missing_region_); 226 current_region_.Swap(&missing_region_);
227 missing_region_.Clear(); 227 missing_region_.Clear();
228 region_iter_ = Region::Iterator(current_region_); 228 region_iter_ = Region::Iterator(current_region_);
229 229
230 // All done and all filled. 230 // All done and all filled.
231 if (!region_iter_.has_rect()) { 231 if (!region_iter_.has_rect()) {
232 current_tiling_ = set_->tilings_.size(); 232 current_tiling_ = set_->tilings_.size();
233 return *this; 233 return *this;
234 } 234 }
235 235
236 // No more valid tiles, return this checkerboard rect. 236 // No more valid tiles, return this checkerboard rect.
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 } 304 }
305 305
306 scoped_ptr<base::Value> PictureLayerTilingSet::AsValue() const { 306 scoped_ptr<base::Value> PictureLayerTilingSet::AsValue() const {
307 scoped_ptr<base::ListValue> state(new base::ListValue()); 307 scoped_ptr<base::ListValue> state(new base::ListValue());
308 for (size_t i = 0; i < tilings_.size(); ++i) 308 for (size_t i = 0; i < tilings_.size(); ++i)
309 state->Append(tilings_[i]->AsValue().release()); 309 state->Append(tilings_[i]->AsValue().release());
310 return state.PassAs<base::Value>(); 310 return state.PassAs<base::Value>();
311 } 311 }
312 312
313 } // namespace cc 313 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/software_renderer_unittest.cc ('k') | cc/resources/tile_priority.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698