| 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 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 847 eviction_tiles_now_.clear(); | 847 eviction_tiles_now_.clear(); |
| 848 eviction_tiles_now_and_required_for_activation_.clear(); | 848 eviction_tiles_now_and_required_for_activation_.clear(); |
| 849 eviction_tiles_soon_.clear(); | 849 eviction_tiles_soon_.clear(); |
| 850 eviction_tiles_soon_and_required_for_activation_.clear(); | 850 eviction_tiles_soon_and_required_for_activation_.clear(); |
| 851 eviction_tiles_eventually_.clear(); | 851 eviction_tiles_eventually_.clear(); |
| 852 eviction_tiles_eventually_and_required_for_activation_.clear(); | 852 eviction_tiles_eventually_and_required_for_activation_.clear(); |
| 853 | 853 |
| 854 for (TileMap::iterator it = tiles_.begin(); it != tiles_.end(); ++it) { | 854 for (TileMap::iterator it = tiles_.begin(); it != tiles_.end(); ++it) { |
| 855 // TODO(vmpstr): This should update the priority if UpdateTilePriorities | 855 // TODO(vmpstr): This should update the priority if UpdateTilePriorities |
| 856 // changes not to do this. | 856 // changes not to do this. |
| 857 Tile* tile = it->second; | 857 Tile* tile = it->second.get(); |
| 858 const TilePriority& priority = | 858 const TilePriority& priority = |
| 859 tile->priority_for_tree_priority(tree_priority); | 859 tile->priority_for_tree_priority(tree_priority); |
| 860 switch (priority.priority_bin) { | 860 switch (priority.priority_bin) { |
| 861 case TilePriority::EVENTUALLY: | 861 case TilePriority::EVENTUALLY: |
| 862 if (tile->required_for_activation()) | 862 if (tile->required_for_activation()) |
| 863 eviction_tiles_eventually_and_required_for_activation_.push_back( | 863 eviction_tiles_eventually_and_required_for_activation_.push_back( |
| 864 tile); | 864 tile); |
| 865 else | 865 else |
| 866 eviction_tiles_eventually_.push_back(tile); | 866 eviction_tiles_eventually_.push_back(tile); |
| 867 break; | 867 break; |
| (...skipping 221 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 |