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 { | |
735 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it) { | |
736 state->BeginDictionary(); | |
737 it->second->AsValueInto(state); | |
738 state->EndDictionary(); | |
739 } | |
740 } | |
741 | |
742 void TileManager::AssignGpuMemoryToTiles( | 734 void TileManager::AssignGpuMemoryToTiles( |
743 PrioritizedTileSet* tiles, | 735 PrioritizedTileSet* tiles, |
744 TileVector* tiles_that_need_to_be_rasterized) { | 736 TileVector* tiles_that_need_to_be_rasterized) { |
745 TRACE_EVENT0("cc", "TileManager::AssignGpuMemoryToTiles"); | 737 TRACE_EVENT0("cc", "TileManager::AssignGpuMemoryToTiles"); |
746 | 738 |
747 // Maintain the list of released resources that can potentially be re-used | 739 // Maintain the list of released resources that can potentially be re-used |
748 // or deleted. | 740 // or deleted. |
749 // If this operation becomes expensive too, only do this after some | 741 // If this operation becomes expensive too, only do this after some |
750 // resource(s) was returned. Note that in that case, one also need to | 742 // resource(s) was returned. Note that in that case, one also need to |
751 // invalidate when releasing some resource from the pool. | 743 // invalidate when releasing some resource from the pool. |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1176 TRACE_EVENT0("cc", "TileManager::CheckIfReadyToActivate"); | 1168 TRACE_EVENT0("cc", "TileManager::CheckIfReadyToActivate"); |
1177 | 1169 |
1178 rasterizer_->CheckForCompletedTasks(); | 1170 rasterizer_->CheckForCompletedTasks(); |
1179 did_check_for_completed_tasks_since_last_schedule_tasks_ = true; | 1171 did_check_for_completed_tasks_since_last_schedule_tasks_ = true; |
1180 | 1172 |
1181 if (IsReadyToActivate()) | 1173 if (IsReadyToActivate()) |
1182 client_->NotifyReadyToActivate(); | 1174 client_->NotifyReadyToActivate(); |
1183 } | 1175 } |
1184 | 1176 |
1185 } // namespace cc | 1177 } // namespace cc |
OLD | NEW |