| 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 | 8 |
| 9 namespace cc { | 9 namespace cc { |
| 10 | 10 |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 | 191 |
| 192 if (!*this && !first_time) | 192 if (!*this && !first_time) |
| 193 return *this; | 193 return *this; |
| 194 | 194 |
| 195 if (tiling_iter_) | 195 if (tiling_iter_) |
| 196 ++tiling_iter_; | 196 ++tiling_iter_; |
| 197 | 197 |
| 198 // Loop until we find a valid place to stop. | 198 // Loop until we find a valid place to stop. |
| 199 while (true) { | 199 while (true) { |
| 200 while (tiling_iter_ && | 200 while (tiling_iter_ && |
| 201 (!*tiling_iter_ || !tiling_iter_->tile_version().IsReadyToDraw())) { | 201 (!*tiling_iter_ || !tiling_iter_->IsReadyToDraw(NULL))) { |
| 202 missing_region_.Union(tiling_iter_.geometry_rect()); | 202 missing_region_.Union(tiling_iter_.geometry_rect()); |
| 203 ++tiling_iter_; | 203 ++tiling_iter_; |
| 204 } | 204 } |
| 205 if (tiling_iter_) | 205 if (tiling_iter_) |
| 206 return *this; | 206 return *this; |
| 207 | 207 |
| 208 // If the set of current rects for this tiling is done, go to the next | 208 // If the set of current rects for this tiling is done, go to the next |
| 209 // tiling and set up to iterate through all of the remaining holes. | 209 // tiling and set up to iterate through all of the remaining holes. |
| 210 // This will also happen the first time through the loop. | 210 // This will also happen the first time through the loop. |
| 211 if (!region_iter_.has_rect()) { | 211 if (!region_iter_.has_rect()) { |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 } | 300 } |
| 301 | 301 |
| 302 size_t PictureLayerTilingSet::GPUMemoryUsageInBytes() const { | 302 size_t PictureLayerTilingSet::GPUMemoryUsageInBytes() const { |
| 303 size_t amount = 0; | 303 size_t amount = 0; |
| 304 for (size_t i = 0; i < tilings_.size(); ++i) | 304 for (size_t i = 0; i < tilings_.size(); ++i) |
| 305 amount += tilings_[i]->GPUMemoryUsageInBytes(); | 305 amount += tilings_[i]->GPUMemoryUsageInBytes(); |
| 306 return amount; | 306 return amount; |
| 307 } | 307 } |
| 308 | 308 |
| 309 } // namespace cc | 309 } // namespace cc |
| OLD | NEW |