| OLD | NEW |
| 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 #include <limits> | 7 #include <limits> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 } | 472 } |
| 473 | 473 |
| 474 return *this; | 474 return *this; |
| 475 } | 475 } |
| 476 | 476 |
| 477 PictureLayerTilingSet::CoverageIterator::operator bool() const { | 477 PictureLayerTilingSet::CoverageIterator::operator bool() const { |
| 478 return current_tiling_ < static_cast<int>(set_->tilings_.size()) || | 478 return current_tiling_ < static_cast<int>(set_->tilings_.size()) || |
| 479 region_iter_.has_rect(); | 479 region_iter_.has_rect(); |
| 480 } | 480 } |
| 481 | 481 |
| 482 void PictureLayerTilingSet::AsValueInto(base::debug::TracedValue* state) const { | 482 void PictureLayerTilingSet::AsValueInto( |
| 483 base::trace_event::TracedValue* state) const { |
| 483 for (size_t i = 0; i < tilings_.size(); ++i) { | 484 for (size_t i = 0; i < tilings_.size(); ++i) { |
| 484 state->BeginDictionary(); | 485 state->BeginDictionary(); |
| 485 tilings_[i]->AsValueInto(state); | 486 tilings_[i]->AsValueInto(state); |
| 486 state->EndDictionary(); | 487 state->EndDictionary(); |
| 487 } | 488 } |
| 488 } | 489 } |
| 489 | 490 |
| 490 size_t PictureLayerTilingSet::GPUMemoryUsageInBytes() const { | 491 size_t PictureLayerTilingSet::GPUMemoryUsageInBytes() const { |
| 491 size_t amount = 0; | 492 size_t amount = 0; |
| 492 for (size_t i = 0; i < tilings_.size(); ++i) | 493 for (size_t i = 0; i < tilings_.size(); ++i) |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 case LOWER_THAN_LOW_RES: | 536 case LOWER_THAN_LOW_RES: |
| 536 range = TilingRange(low_res_range.end, tilings_.size()); | 537 range = TilingRange(low_res_range.end, tilings_.size()); |
| 537 break; | 538 break; |
| 538 } | 539 } |
| 539 | 540 |
| 540 DCHECK_LE(range.start, range.end); | 541 DCHECK_LE(range.start, range.end); |
| 541 return range; | 542 return range; |
| 542 } | 543 } |
| 543 | 544 |
| 544 } // namespace cc | 545 } // namespace cc |
| OLD | NEW |