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.h" | 5 #include "cc/resources/picture_layer_tiling.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <limits> | 9 #include <limits> |
10 | 10 |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 | 498 |
499 last_impl_frame_time_in_seconds_ = current_frame_time_in_seconds; | 499 last_impl_frame_time_in_seconds_ = current_frame_time_in_seconds; |
500 last_visible_rect_in_content_space_ = visible_rect_in_content_space; | 500 last_visible_rect_in_content_space_ = visible_rect_in_content_space; |
501 | 501 |
502 eviction_tiles_cache_valid_ = false; | 502 eviction_tiles_cache_valid_ = false; |
503 | 503 |
504 TilePriority now_priority(resolution_, TilePriority::NOW, 0); | 504 TilePriority now_priority(resolution_, TilePriority::NOW, 0); |
505 float content_to_screen_scale = ideal_contents_scale / contents_scale_; | 505 float content_to_screen_scale = ideal_contents_scale / contents_scale_; |
506 | 506 |
507 // Assign now priority to all visible tiles. | 507 // Assign now priority to all visible tiles. |
508 bool include_borders = true; | 508 bool include_borders = false; |
509 has_visible_rect_tiles_ = false; | 509 has_visible_rect_tiles_ = false; |
510 for (TilingData::Iterator iter( | 510 for (TilingData::Iterator iter( |
511 &tiling_data_, visible_rect_in_content_space, include_borders); | 511 &tiling_data_, visible_rect_in_content_space, include_borders); |
512 iter; | 512 iter; |
513 ++iter) { | 513 ++iter) { |
514 TileMap::iterator find = tiles_.find(iter.index()); | 514 TileMap::iterator find = tiles_.find(iter.index()); |
515 if (find == tiles_.end()) | 515 if (find == tiles_.end()) |
516 continue; | 516 continue; |
517 has_visible_rect_tiles_ = true; | 517 has_visible_rect_tiles_ = true; |
518 Tile* tile = find->second.get(); | 518 Tile* tile = find->second.get(); |
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1089 DCHECK(*this); | 1089 DCHECK(*this); |
1090 do { | 1090 do { |
1091 ++current_eviction_tiles_index_; | 1091 ++current_eviction_tiles_index_; |
1092 } while (current_eviction_tiles_index_ != eviction_tiles_->size() && | 1092 } while (current_eviction_tiles_index_ != eviction_tiles_->size() && |
1093 !(*eviction_tiles_)[current_eviction_tiles_index_]->HasResources()); | 1093 !(*eviction_tiles_)[current_eviction_tiles_index_]->HasResources()); |
1094 | 1094 |
1095 return *this; | 1095 return *this; |
1096 } | 1096 } |
1097 | 1097 |
1098 } // namespace cc | 1098 } // namespace cc |
OLD | NEW |