OLD | NEW |
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/geometry/rect.h" | 9 #include "ui/gfx/geometry/rect.h" |
10 #include "ui/gfx/geometry/vector2d.h" | 10 #include "ui/gfx/geometry/vector2d.h" |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 | 411 |
412 bool TilingData::BaseDifferenceIterator::HasConsiderRect() const { | 412 bool TilingData::BaseDifferenceIterator::HasConsiderRect() const { |
413 // Consider indices are either all valid or all equal to -1. | 413 // Consider indices are either all valid or all equal to -1. |
414 DCHECK((0 <= consider_left_ && consider_left_ <= consider_right_ && | 414 DCHECK((0 <= consider_left_ && consider_left_ <= consider_right_ && |
415 0 <= consider_top_ && consider_top_ <= consider_bottom_) || | 415 0 <= consider_top_ && consider_top_ <= consider_bottom_) || |
416 (consider_left_ == -1 && consider_top_ == -1 && | 416 (consider_left_ == -1 && consider_top_ == -1 && |
417 consider_right_ == -1 && consider_bottom_ == -1)); | 417 consider_right_ == -1 && consider_bottom_ == -1)); |
418 return consider_left_ != -1; | 418 return consider_left_ != -1; |
419 } | 419 } |
420 | 420 |
| 421 TilingData::DifferenceIterator::DifferenceIterator() { |
| 422 } |
| 423 |
421 TilingData::DifferenceIterator::DifferenceIterator( | 424 TilingData::DifferenceIterator::DifferenceIterator( |
422 const TilingData* tiling_data, | 425 const TilingData* tiling_data, |
423 const gfx::Rect& consider_rect, | 426 const gfx::Rect& consider_rect, |
424 const gfx::Rect& ignore_rect) | 427 const gfx::Rect& ignore_rect) |
425 : BaseDifferenceIterator(tiling_data, consider_rect, ignore_rect) { | 428 : BaseDifferenceIterator(tiling_data, consider_rect, ignore_rect) { |
426 if (!HasConsiderRect()) { | 429 if (!HasConsiderRect()) { |
427 done(); | 430 done(); |
428 return; | 431 return; |
429 } | 432 } |
430 | 433 |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 | 858 |
856 // We should always end up in an around rect at some point. | 859 // We should always end up in an around rect at some point. |
857 // Since the direction is now vertical, we have to ensure that we will | 860 // Since the direction is now vertical, we have to ensure that we will |
858 // advance. | 861 // advance. |
859 DCHECK_GE(horizontal_step_count_, 1); | 862 DCHECK_GE(horizontal_step_count_, 1); |
860 DCHECK_GE(vertical_step_count_, 1); | 863 DCHECK_GE(vertical_step_count_, 1); |
861 } | 864 } |
862 } | 865 } |
863 | 866 |
864 } // namespace cc | 867 } // namespace cc |
OLD | NEW |