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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 if (PictureLayerTiling* this_tiling = TilingAtScale(contents_scale)) { | 69 if (PictureLayerTiling* this_tiling = TilingAtScale(contents_scale)) { |
70 this_tiling->set_resolution(other.tilings_[i]->resolution()); | 70 this_tiling->set_resolution(other.tilings_[i]->resolution()); |
71 | 71 |
72 this_tiling->UpdateTilesToCurrentPile(layer_invalidation, | 72 this_tiling->UpdateTilesToCurrentPile(layer_invalidation, |
73 new_layer_bounds); | 73 new_layer_bounds); |
74 this_tiling->CreateMissingTilesInLiveTilesRect(); | 74 this_tiling->CreateMissingTilesInLiveTilesRect(); |
75 if (this_tiling->resolution() == HIGH_RESOLUTION) | 75 if (this_tiling->resolution() == HIGH_RESOLUTION) |
76 have_high_res_tiling = true; | 76 have_high_res_tiling = true; |
77 | 77 |
78 DCHECK(this_tiling->tile_size() == | 78 DCHECK(this_tiling->tile_size() == |
79 client_->CalculateTileSize(this_tiling->TilingRect().size())); | 79 client_->CalculateTileSize(this_tiling->tiling_size())) |
| 80 << "tile_size: " << this_tiling->tile_size().ToString() |
| 81 << " tiling_size: " << this_tiling->tiling_size().ToString() |
| 82 << " CalculateTileSize: " |
| 83 << client_->CalculateTileSize(this_tiling->tiling_size()).ToString(); |
80 continue; | 84 continue; |
81 } | 85 } |
82 scoped_ptr<PictureLayerTiling> new_tiling = PictureLayerTiling::Create( | 86 scoped_ptr<PictureLayerTiling> new_tiling = PictureLayerTiling::Create( |
83 contents_scale, | 87 contents_scale, |
84 new_layer_bounds, | 88 new_layer_bounds, |
85 client_); | 89 client_); |
86 new_tiling->set_resolution(other.tilings_[i]->resolution()); | 90 new_tiling->set_resolution(other.tilings_[i]->resolution()); |
87 if (new_tiling->resolution() == HIGH_RESOLUTION) | 91 if (new_tiling->resolution() == HIGH_RESOLUTION) |
88 have_high_res_tiling = true; | 92 have_high_res_tiling = true; |
89 tilings_.push_back(new_tiling.Pass()); | 93 tilings_.push_back(new_tiling.Pass()); |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 } | 320 } |
317 | 321 |
318 size_t PictureLayerTilingSet::GPUMemoryUsageInBytes() const { | 322 size_t PictureLayerTilingSet::GPUMemoryUsageInBytes() const { |
319 size_t amount = 0; | 323 size_t amount = 0; |
320 for (size_t i = 0; i < tilings_.size(); ++i) | 324 for (size_t i = 0; i < tilings_.size(); ++i) |
321 amount += tilings_[i]->GPUMemoryUsageInBytes(); | 325 amount += tilings_[i]->GPUMemoryUsageInBytes(); |
322 return amount; | 326 return amount; |
323 } | 327 } |
324 | 328 |
325 } // namespace cc | 329 } // namespace cc |
OLD | NEW |