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/tiles/tile_manager.h" | 5 #include "cc/tiles/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 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 PrioritizedTileVector* tiles_that_need_to_be_rasterized) { | 534 PrioritizedTileVector* tiles_that_need_to_be_rasterized) { |
535 TRACE_EVENT_BEGIN0("cc", "TileManager::AssignGpuMemoryToTiles"); | 535 TRACE_EVENT_BEGIN0("cc", "TileManager::AssignGpuMemoryToTiles"); |
536 | 536 |
537 DCHECK(resource_pool_); | 537 DCHECK(resource_pool_); |
538 DCHECK(tile_task_runner_); | 538 DCHECK(tile_task_runner_); |
539 | 539 |
540 // Maintain the list of released resources that can potentially be re-used | 540 // Maintain the list of released resources that can potentially be re-used |
541 // or deleted. If this operation becomes expensive too, only do this after | 541 // or deleted. If this operation becomes expensive too, only do this after |
542 // some resource(s) was returned. Note that in that case, one also need to | 542 // some resource(s) was returned. Note that in that case, one also need to |
543 // invalidate when releasing some resource from the pool. | 543 // invalidate when releasing some resource from the pool. |
544 resource_pool_->CheckBusyResources(false); | 544 resource_pool_->CheckBusyResources(); |
545 | 545 |
546 // Now give memory out to the tiles until we're out, and build | 546 // Now give memory out to the tiles until we're out, and build |
547 // the needs-to-be-rasterized queue. | 547 // the needs-to-be-rasterized queue. |
548 unsigned schedule_priority = 1u; | 548 unsigned schedule_priority = 1u; |
549 all_tiles_that_need_to_be_rasterized_are_scheduled_ = true; | 549 all_tiles_that_need_to_be_rasterized_are_scheduled_ = true; |
550 bool had_enough_memory_to_schedule_tiles_needed_now = true; | 550 bool had_enough_memory_to_schedule_tiles_needed_now = true; |
551 | 551 |
552 MemoryUsage hard_memory_limit(global_state_.hard_memory_limit_in_bytes, | 552 MemoryUsage hard_memory_limit(global_state_.hard_memory_limit_in_bytes, |
553 global_state_.num_resources_limit); | 553 global_state_.num_resources_limit); |
554 MemoryUsage soft_memory_limit(global_state_.soft_memory_limit_in_bytes, | 554 MemoryUsage soft_memory_limit(global_state_.soft_memory_limit_in_bytes, |
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1094 void TileManager::Signals::reset() { | 1094 void TileManager::Signals::reset() { |
1095 ready_to_activate = false; | 1095 ready_to_activate = false; |
1096 did_notify_ready_to_activate = false; | 1096 did_notify_ready_to_activate = false; |
1097 ready_to_draw = false; | 1097 ready_to_draw = false; |
1098 did_notify_ready_to_draw = false; | 1098 did_notify_ready_to_draw = false; |
1099 all_tile_tasks_completed = false; | 1099 all_tile_tasks_completed = false; |
1100 did_notify_all_tile_tasks_completed = false; | 1100 did_notify_all_tile_tasks_completed = false; |
1101 } | 1101 } |
1102 | 1102 |
1103 } // namespace cc | 1103 } // namespace cc |
OLD | NEW |