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 51 matching lines...) Loading... |
62 bool have_high_res_tiling = false; | 62 bool have_high_res_tiling = false; |
63 | 63 |
64 // Add any missing tilings from |other| that meet the minimum. | 64 // Add any missing tilings from |other| that meet the minimum. |
65 for (size_t i = 0; i < other.tilings_.size(); ++i) { | 65 for (size_t i = 0; i < other.tilings_.size(); ++i) { |
66 float contents_scale = other.tilings_[i]->contents_scale(); | 66 float contents_scale = other.tilings_[i]->contents_scale(); |
67 if (contents_scale < minimum_contents_scale) | 67 if (contents_scale < minimum_contents_scale) |
68 continue; | 68 continue; |
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->UpdateTilesToCurrentRasterSource(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->tiling_size())) | 79 client_->CalculateTileSize(this_tiling->tiling_size())) |
80 << "tile_size: " << this_tiling->tile_size().ToString() | 80 << "tile_size: " << this_tiling->tile_size().ToString() |
81 << " tiling_size: " << this_tiling->tiling_size().ToString() | 81 << " tiling_size: " << this_tiling->tiling_size().ToString() |
82 << " CalculateTileSize: " | 82 << " CalculateTileSize: " |
83 << client_->CalculateTileSize(this_tiling->tiling_size()).ToString(); | 83 << client_->CalculateTileSize(this_tiling->tiling_size()).ToString(); |
(...skipping 281 matching lines...) Loading... |
365 case LOWER_THAN_LOW_RES: | 365 case LOWER_THAN_LOW_RES: |
366 range = TilingRange(low_res_range.end, tilings_.size()); | 366 range = TilingRange(low_res_range.end, tilings_.size()); |
367 break; | 367 break; |
368 } | 368 } |
369 | 369 |
370 DCHECK_LE(range.start, range.end); | 370 DCHECK_LE(range.start, range.end); |
371 return range; | 371 return range; |
372 } | 372 } |
373 | 373 |
374 } // namespace cc | 374 } // namespace cc |
OLD | NEW |