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

Side by Side Diff: cc/base/tiling_data.cc

Issue 632613002: [C++11 Allowed Features] Declares a type-safe null pointer converting from NULL to nullptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « cc/base/swap_promise_monitor.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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/base/tiling_data.h" 5 #include "cc/base/tiling_data.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ui/gfx/rect.h" 9 #include "ui/gfx/rect.h"
10 #include "ui/gfx/vector2d.h" 10 #include "ui/gfx/vector2d.h"
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 num_tiles_y_ = ComputeNumTiles( 292 num_tiles_y_ = ComputeNumTiles(
293 max_texture_size_.height(), tiling_size_.height(), border_texels_); 293 max_texture_size_.height(), tiling_size_.height(), border_texels_);
294 } 294 }
295 295
296 TilingData::BaseIterator::BaseIterator(const TilingData* tiling_data) 296 TilingData::BaseIterator::BaseIterator(const TilingData* tiling_data)
297 : tiling_data_(tiling_data), 297 : tiling_data_(tiling_data),
298 index_x_(-1), 298 index_x_(-1),
299 index_y_(-1) { 299 index_y_(-1) {
300 } 300 }
301 301
302 TilingData::Iterator::Iterator() : BaseIterator(NULL) { done(); } 302 TilingData::Iterator::Iterator() : BaseIterator(nullptr) { done(); }
303 303
304 TilingData::Iterator::Iterator(const TilingData* tiling_data, 304 TilingData::Iterator::Iterator(const TilingData* tiling_data,
305 const gfx::Rect& consider_rect, 305 const gfx::Rect& consider_rect,
306 bool include_borders) 306 bool include_borders)
307 : BaseIterator(tiling_data), left_(-1), right_(-1), bottom_(-1) { 307 : BaseIterator(tiling_data), left_(-1), right_(-1), bottom_(-1) {
308 if (tiling_data_->num_tiles_x() <= 0 || tiling_data_->num_tiles_y() <= 0) { 308 if (tiling_data_->num_tiles_x() <= 0 || tiling_data_->num_tiles_y() <= 0) {
309 done(); 309 done();
310 return; 310 return;
311 } 311 }
312 312
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 } 434 }
435 435
436 if (index_y_ > consider_bottom_) 436 if (index_y_ > consider_bottom_)
437 done(); 437 done();
438 } 438 }
439 439
440 return *this; 440 return *this;
441 } 441 }
442 442
443 TilingData::SpiralDifferenceIterator::SpiralDifferenceIterator() 443 TilingData::SpiralDifferenceIterator::SpiralDifferenceIterator()
444 : BaseIterator(NULL) { 444 : BaseIterator(nullptr) {
445 done(); 445 done();
446 } 446 }
447 447
448 TilingData::SpiralDifferenceIterator::SpiralDifferenceIterator( 448 TilingData::SpiralDifferenceIterator::SpiralDifferenceIterator(
449 const TilingData* tiling_data, 449 const TilingData* tiling_data,
450 const gfx::Rect& consider_rect, 450 const gfx::Rect& consider_rect,
451 const gfx::Rect& ignore_rect, 451 const gfx::Rect& ignore_rect,
452 const gfx::Rect& center_rect) 452 const gfx::Rect& center_rect)
453 : BaseIterator(tiling_data), 453 : BaseIterator(tiling_data),
454 consider_left_(-1), 454 consider_left_(-1),
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 current_step_ = 0; 659 current_step_ = 0;
660 direction_ = static_cast<Direction>((direction_ + 1) % 4); 660 direction_ = static_cast<Direction>((direction_ + 1) % 4);
661 661
662 if (direction_ == RIGHT || direction_ == LEFT) { 662 if (direction_ == RIGHT || direction_ == LEFT) {
663 ++vertical_step_count_; 663 ++vertical_step_count_;
664 ++horizontal_step_count_; 664 ++horizontal_step_count_;
665 } 665 }
666 } 666 }
667 667
668 } // namespace cc 668 } // namespace cc
OLDNEW
« no previous file with comments | « cc/base/swap_promise_monitor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698