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/tile_manager.h" | 5 #include "cc/resources/tile_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
724 return value; | 724 return value; |
725 } | 725 } |
726 | 726 |
727 void TileManager::BasicStateAsValueInto(base::debug::TracedValue* state) const { | 727 void TileManager::BasicStateAsValueInto(base::debug::TracedValue* state) const { |
728 state->SetInteger("tile_count", tiles_.size()); | 728 state->SetInteger("tile_count", tiles_.size()); |
729 state->BeginDictionary("global_state"); | 729 state->BeginDictionary("global_state"); |
730 global_state_.AsValueInto(state); | 730 global_state_.AsValueInto(state); |
731 state->EndDictionary(); | 731 state->EndDictionary(); |
732 } | 732 } |
733 | 733 |
734 void TileManager::AllTilesAsValueInto(base::debug::TracedValue* state) const { | 734 void TileManager::AllTilesAsValueInto( |
| 735 base::debug::TracedValue* state, |
| 736 const std::set<const Tile*>& active_tiles) const { |
735 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it) { | 737 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it) { |
| 738 bool is_active = active_tiles.count(it->second) != 0; |
736 state->BeginDictionary(); | 739 state->BeginDictionary(); |
737 it->second->AsValueInto(state); | 740 it->second->AsValueInto(state, is_active); |
738 state->EndDictionary(); | 741 state->EndDictionary(); |
739 } | 742 } |
740 } | 743 } |
741 | 744 |
742 void TileManager::AssignGpuMemoryToTiles( | 745 void TileManager::AssignGpuMemoryToTiles( |
743 PrioritizedTileSet* tiles, | 746 PrioritizedTileSet* tiles, |
744 TileVector* tiles_that_need_to_be_rasterized) { | 747 TileVector* tiles_that_need_to_be_rasterized) { |
745 TRACE_EVENT0("cc", "TileManager::AssignGpuMemoryToTiles"); | 748 TRACE_EVENT0("cc", "TileManager::AssignGpuMemoryToTiles"); |
746 | 749 |
747 // Maintain the list of released resources that can potentially be re-used | 750 // Maintain the list of released resources that can potentially be re-used |
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1176 TRACE_EVENT0("cc", "TileManager::CheckIfReadyToActivate"); | 1179 TRACE_EVENT0("cc", "TileManager::CheckIfReadyToActivate"); |
1177 | 1180 |
1178 rasterizer_->CheckForCompletedTasks(); | 1181 rasterizer_->CheckForCompletedTasks(); |
1179 did_check_for_completed_tasks_since_last_schedule_tasks_ = true; | 1182 did_check_for_completed_tasks_since_last_schedule_tasks_ = true; |
1180 | 1183 |
1181 if (IsReadyToActivate()) | 1184 if (IsReadyToActivate()) |
1182 client_->NotifyReadyToActivate(); | 1185 client_->NotifyReadyToActivate(); |
1183 } | 1186 } |
1184 | 1187 |
1185 } // namespace cc | 1188 } // namespace cc |
OLD | NEW |