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 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 ready_to_activate_check_notifier_.Schedule(); | 393 ready_to_activate_check_notifier_.Schedule(); |
394 return; | 394 return; |
395 case REQUIRED_FOR_DRAW: | 395 case REQUIRED_FOR_DRAW: |
396 ready_to_draw_check_notifier_.Schedule(); | 396 ready_to_draw_check_notifier_.Schedule(); |
397 return; | 397 return; |
398 } | 398 } |
399 | 399 |
400 NOTREACHED(); | 400 NOTREACHED(); |
401 } | 401 } |
402 | 402 |
403 void TileManager::ManageTiles(const GlobalStateThatImpactsTilePriority& state) { | 403 void TileManager::PrepareTiles( |
404 TRACE_EVENT0("cc", "TileManager::ManageTiles"); | 404 const GlobalStateThatImpactsTilePriority& state) { |
| 405 TRACE_EVENT0("cc", "TileManager::PrepareTiles"); |
405 | 406 |
406 global_state_ = state; | 407 global_state_ = state; |
407 | 408 |
408 // We need to call CheckForCompletedTasks() once in-between each call | 409 // We need to call CheckForCompletedTasks() once in-between each call |
409 // to ScheduleTasks() to prevent canceled tasks from being scheduled. | 410 // to ScheduleTasks() to prevent canceled tasks from being scheduled. |
410 if (!did_check_for_completed_tasks_since_last_schedule_tasks_) { | 411 if (!did_check_for_completed_tasks_since_last_schedule_tasks_) { |
411 rasterizer_->CheckForCompletedTasks(); | 412 rasterizer_->CheckForCompletedTasks(); |
412 did_check_for_completed_tasks_since_last_schedule_tasks_ = true; | 413 did_check_for_completed_tasks_since_last_schedule_tasks_ = true; |
413 } | 414 } |
414 | 415 |
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
955 result -= other; | 956 result -= other; |
956 return result; | 957 return result; |
957 } | 958 } |
958 | 959 |
959 bool TileManager::MemoryUsage::Exceeds(const MemoryUsage& limit) const { | 960 bool TileManager::MemoryUsage::Exceeds(const MemoryUsage& limit) const { |
960 return memory_bytes_ > limit.memory_bytes_ || | 961 return memory_bytes_ > limit.memory_bytes_ || |
961 resource_count_ > limit.resource_count_; | 962 resource_count_ > limit.resource_count_; |
962 } | 963 } |
963 | 964 |
964 } // namespace cc | 965 } // namespace cc |
OLD | NEW |