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 | |
424 TilingData::DifferenceIterator::DifferenceIterator( | 421 TilingData::DifferenceIterator::DifferenceIterator( |
425 const TilingData* tiling_data, | 422 const TilingData* tiling_data, |
426 const gfx::Rect& consider_rect, | 423 const gfx::Rect& consider_rect, |
427 const gfx::Rect& ignore_rect) | 424 const gfx::Rect& ignore_rect) |
428 : BaseDifferenceIterator(tiling_data, consider_rect, ignore_rect) { | 425 : BaseDifferenceIterator(tiling_data, consider_rect, ignore_rect) { |
429 if (!HasConsiderRect()) { | 426 if (!HasConsiderRect()) { |
430 done(); | 427 done(); |
431 return; | 428 return; |
432 } | 429 } |
433 | 430 |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
858 | 855 |
859 // We should always end up in an around rect at some point. | 856 // We should always end up in an around rect at some point. |
860 // Since the direction is now vertical, we have to ensure that we will | 857 // Since the direction is now vertical, we have to ensure that we will |
861 // advance. | 858 // advance. |
862 DCHECK_GE(horizontal_step_count_, 1); | 859 DCHECK_GE(horizontal_step_count_, 1); |
863 DCHECK_GE(vertical_step_count_, 1); | 860 DCHECK_GE(vertical_step_count_, 1); |
864 } | 861 } |
865 } | 862 } |
866 | 863 |
867 } // namespace cc | 864 } // namespace cc |
OLD | NEW |