| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/bitmap_tile_task_worker_pool.h" | 5 #include "cc/resources/bitmap_tile_task_worker_pool.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/debug/trace_event_argument.h" | 10 #include "base/debug/trace_event_argument.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 task_set_finished_weak_ptr_factory_(this) { | 61 task_set_finished_weak_ptr_factory_(this) { |
| 62 } | 62 } |
| 63 | 63 |
| 64 BitmapTileTaskWorkerPool::~BitmapTileTaskWorkerPool() { | 64 BitmapTileTaskWorkerPool::~BitmapTileTaskWorkerPool() { |
| 65 } | 65 } |
| 66 | 66 |
| 67 TileTaskRunner* BitmapTileTaskWorkerPool::AsTileTaskRunner() { | 67 TileTaskRunner* BitmapTileTaskWorkerPool::AsTileTaskRunner() { |
| 68 return this; | 68 return this; |
| 69 } | 69 } |
| 70 | 70 |
| 71 ResourceFormat BitmapTileTaskWorkerPool::GetResourceFormat() { |
| 72 return resource_provider_->best_texture_format(); |
| 73 } |
| 74 |
| 71 void BitmapTileTaskWorkerPool::SetClient(TileTaskRunnerClient* client) { | 75 void BitmapTileTaskWorkerPool::SetClient(TileTaskRunnerClient* client) { |
| 72 client_ = client; | 76 client_ = client; |
| 73 } | 77 } |
| 74 | 78 |
| 75 void BitmapTileTaskWorkerPool::Shutdown() { | 79 void BitmapTileTaskWorkerPool::Shutdown() { |
| 76 TRACE_EVENT0("cc", "BitmapTileTaskWorkerPool::Shutdown"); | 80 TRACE_EVENT0("cc", "BitmapTileTaskWorkerPool::Shutdown"); |
| 77 | 81 |
| 78 TaskGraph empty; | 82 TaskGraph empty; |
| 79 task_graph_runner_->ScheduleTasks(namespace_token_, &empty); | 83 task_graph_runner_->ScheduleTasks(namespace_token_, &empty); |
| 80 task_graph_runner_->WaitForTasksToFinishRunning(namespace_token_); | 84 task_graph_runner_->WaitForTasksToFinishRunning(namespace_token_); |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 new base::debug::TracedValue(); | 196 new base::debug::TracedValue(); |
| 193 | 197 |
| 194 state->BeginArray("tasks_pending"); | 198 state->BeginArray("tasks_pending"); |
| 195 for (TaskSet task_set = 0; task_set < kNumberOfTaskSets; ++task_set) | 199 for (TaskSet task_set = 0; task_set < kNumberOfTaskSets; ++task_set) |
| 196 state->AppendBoolean(tasks_pending_[task_set]); | 200 state->AppendBoolean(tasks_pending_[task_set]); |
| 197 state->EndArray(); | 201 state->EndArray(); |
| 198 return state; | 202 return state; |
| 199 } | 203 } |
| 200 | 204 |
| 201 } // namespace cc | 205 } // namespace cc |
| OLD | NEW |