Index: cc/tiles/tile_manager.cc |
diff --git a/cc/tiles/tile_manager.cc b/cc/tiles/tile_manager.cc |
index 74f1707eb6bf2e8fd7724a2d571e348f033fd9c2..f4d8fc5fbaddf63e8c89a2c235b4af1e9949367c 100644 |
--- a/cc/tiles/tile_manager.cc |
+++ b/cc/tiles/tile_manager.cc |
@@ -26,7 +26,6 @@ |
#include "cc/layers/picture_layer_impl.h" |
#include "cc/raster/raster_buffer.h" |
#include "cc/raster/task_category.h" |
-#include "cc/raster/tile_task_runner.h" |
#include "cc/tiles/tile.h" |
#include "ui/gfx/geometry/rect_conversions.h" |
@@ -169,7 +168,7 @@ void InsertNodeForDecodeTask(TaskGraph* graph, |
dependency_count = 1u; |
} |
} |
- InsertNodeForTask(graph, task, task->SupportsConcurrentExecution() |
+ InsertNodeForTask(graph, task, task->supports_concurrent_execution() |
? category |
: TASK_CATEGORY_NONCONCURRENT_FOREGROUND, |
priority, dependency_count); |
@@ -309,7 +308,7 @@ TileManager::TileManager(TileManagerClient* client, |
: client_(client), |
task_runner_(std::move(task_runner)), |
resource_pool_(nullptr), |
- tile_task_runner_(nullptr), |
+ tile_task_worker_pool_(nullptr), |
scheduled_raster_task_limit_(scheduled_raster_task_limit), |
use_partial_raster_(use_partial_raster), |
use_gpu_rasterization_(false), |
@@ -333,25 +332,25 @@ TileManager::~TileManager() { |
} |
void TileManager::FinishTasksAndCleanUp() { |
- if (!tile_task_runner_) |
+ if (!tile_task_worker_pool_) |
return; |
global_state_ = GlobalStateThatImpactsTilePriority(); |
// This cancels tasks if possible, finishes pending tasks, and release any |
// uninitialized resources. |
- tile_task_runner_->Shutdown(); |
+ tile_task_worker_pool_->Shutdown(); |
// Now that all tasks have been finished, we can clear any |
// |orphan_tasks_|. |
orphan_tasks_.clear(); |
- tile_task_runner_->CheckForCompletedTasks(); |
+ tile_task_worker_pool_->CheckForCompletedTasks(); |
FreeResourcesForReleasedTiles(); |
CleanUpReleasedTiles(); |
- tile_task_runner_ = nullptr; |
+ tile_task_worker_pool_ = nullptr; |
resource_pool_ = nullptr; |
more_tiles_need_prepare_check_notifier_.Cancel(); |
signals_check_notifier_.Cancel(); |
@@ -359,17 +358,17 @@ void TileManager::FinishTasksAndCleanUp() { |
} |
void TileManager::SetResources(ResourcePool* resource_pool, |
- TileTaskRunner* tile_task_runner, |
+ TileTaskWorkerPool* tile_task_worker_pool, |
ImageDecodeController* image_decode_controller, |
size_t scheduled_raster_task_limit, |
bool use_gpu_rasterization) { |
- DCHECK(!tile_task_runner_); |
- DCHECK(tile_task_runner); |
+ DCHECK(!tile_task_worker_pool_); |
+ DCHECK(tile_task_worker_pool); |
use_gpu_rasterization_ = use_gpu_rasterization; |
scheduled_raster_task_limit_ = scheduled_raster_task_limit; |
resource_pool_ = resource_pool; |
- tile_task_runner_ = tile_task_runner; |
+ tile_task_worker_pool_ = tile_task_worker_pool; |
image_decode_controller_ = image_decode_controller; |
} |
@@ -420,7 +419,7 @@ void TileManager::DidFinishRunningAllTileTasks() { |
TRACE_EVENT0("cc", "TileManager::DidFinishRunningAllTileTasks"); |
TRACE_EVENT_ASYNC_END0("cc", "ScheduledTasks", this); |
DCHECK(resource_pool_); |
- DCHECK(tile_task_runner_); |
+ DCHECK(tile_task_worker_pool_); |
has_scheduled_tile_tasks_ = false; |
@@ -447,7 +446,7 @@ bool TileManager::PrepareTiles( |
TRACE_EVENT1("cc", "TileManager::PrepareTiles", "prepare_tiles_id", |
prepare_tiles_count_); |
- if (!tile_task_runner_) { |
+ if (!tile_task_worker_pool_) { |
TRACE_EVENT_INSTANT0("cc", "PrepareTiles aborted", |
TRACE_EVENT_SCOPE_THREAD); |
return false; |
@@ -459,7 +458,7 @@ bool TileManager::PrepareTiles( |
// We need to call CheckForCompletedTasks() once in-between each call |
// to ScheduleTasks() to prevent canceled tasks from being scheduled. |
if (!did_check_for_completed_tasks_since_last_schedule_tasks_) { |
- tile_task_runner_->CheckForCompletedTasks(); |
+ tile_task_worker_pool_->CheckForCompletedTasks(); |
did_check_for_completed_tasks_since_last_schedule_tasks_ = true; |
} |
@@ -491,12 +490,12 @@ bool TileManager::PrepareTiles( |
void TileManager::Flush() { |
TRACE_EVENT0("cc", "TileManager::Flush"); |
- if (!tile_task_runner_) { |
+ if (!tile_task_worker_pool_) { |
TRACE_EVENT_INSTANT0("cc", "Flush aborted", TRACE_EVENT_SCOPE_THREAD); |
return; |
} |
- tile_task_runner_->CheckForCompletedTasks(); |
+ tile_task_worker_pool_->CheckForCompletedTasks(); |
did_check_for_completed_tasks_since_last_schedule_tasks_ = true; |
@@ -593,7 +592,7 @@ void TileManager::AssignGpuMemoryToTiles( |
TRACE_EVENT_BEGIN0("cc", "TileManager::AssignGpuMemoryToTiles"); |
DCHECK(resource_pool_); |
- DCHECK(tile_task_runner_); |
+ DCHECK(tile_task_worker_pool_); |
// Maintain the list of released resources that can potentially be re-used |
// or deleted. If this operation becomes expensive too, only do this after |
@@ -830,7 +829,7 @@ void TileManager::ScheduleTasks( |
// Schedule running of |raster_queue_|. This replaces any previously |
// scheduled tasks and effectively cancels all tasks not present |
// in |raster_queue_|. |
- tile_task_runner_->ScheduleTasks(&graph_); |
+ tile_task_worker_pool_->ScheduleTasks(&graph_); |
// It's now safe to clean up orphan tasks as raster worker pool is not |
// allowed to keep around unreferenced raster tasks after ScheduleTasks() has |
@@ -959,7 +958,7 @@ ScopedTilePtr TileManager::CreateTile(const Tile::CreateInfo& info, |
int flags) { |
// We need to have a tile task worker pool to do anything meaningful with |
// tiles. |
- DCHECK(tile_task_runner_); |
+ DCHECK(tile_task_worker_pool_); |
ScopedTilePtr tile( |
new Tile(this, info, layer_id, source_frame_number, flags)); |
DCHECK(tiles_.find(tile->id()) == tiles_.end()); |
@@ -968,9 +967,9 @@ ScopedTilePtr TileManager::CreateTile(const Tile::CreateInfo& info, |
return tile; |
} |
-void TileManager::SetTileTaskRunnerForTesting( |
- TileTaskRunner* tile_task_runner) { |
- tile_task_runner_ = tile_task_runner; |
+void TileManager::SetTileTaskWorkerPoolForTesting( |
+ TileTaskWorkerPool* tile_task_worker_pool) { |
+ tile_task_worker_pool_ = tile_task_worker_pool; |
} |
bool TileManager::AreRequiredTilesReadyToDraw( |
@@ -1013,7 +1012,7 @@ bool TileManager::IsReadyToDraw() const { |
void TileManager::CheckAndIssueSignals() { |
TRACE_EVENT0("cc", "TileManager::CheckAndIssueSignals"); |
- tile_task_runner_->CheckForCompletedTasks(); |
+ tile_task_worker_pool_->CheckForCompletedTasks(); |
did_check_for_completed_tasks_since_last_schedule_tasks_ = true; |
// Ready to activate. |
@@ -1053,7 +1052,7 @@ void TileManager::CheckAndIssueSignals() { |
} |
void TileManager::CheckIfMoreTilesNeedToBePrepared() { |
- tile_task_runner_->CheckForCompletedTasks(); |
+ tile_task_worker_pool_->CheckForCompletedTasks(); |
did_check_for_completed_tasks_since_last_schedule_tasks_ = true; |
// When OOM, keep re-assigning memory until we reach a steady state |
@@ -1140,11 +1139,11 @@ bool TileManager::MarkTilesOutOfMemory( |
} |
ResourceFormat TileManager::DetermineResourceFormat(const Tile* tile) const { |
- return tile_task_runner_->GetResourceFormat(!tile->is_opaque()); |
+ return tile_task_worker_pool_->GetResourceFormat(!tile->is_opaque()); |
} |
bool TileManager::DetermineResourceRequiresSwizzle(const Tile* tile) const { |
- return tile_task_runner_->GetResourceRequiresSwizzle(!tile->is_opaque()); |
+ return tile_task_worker_pool_->GetResourceRequiresSwizzle(!tile->is_opaque()); |
} |
std::unique_ptr<base::trace_event::ConvertableToTraceFormat> |