Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2729)

Unified Diff: cc/resources/gpu_tile_task_worker_pool.cc

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resources/gpu_tile_task_worker_pool.h ('k') | cc/resources/one_copy_tile_task_worker_pool.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/gpu_tile_task_worker_pool.cc
diff --git a/cc/resources/gpu_tile_task_worker_pool.cc b/cc/resources/gpu_tile_task_worker_pool.cc
index 86157308f4f289164754576019785d23aa8c3a09..02a46daaa18cf2ece3095e445559ab56bd34fb2f 100644
--- a/cc/resources/gpu_tile_task_worker_pool.cc
+++ b/cc/resources/gpu_tile_task_worker_pool.cc
@@ -6,7 +6,7 @@
#include <algorithm>
-#include "base/debug/trace_event.h"
+#include "base/trace_event/trace_event.h"
#include "cc/resources/raster_buffer.h"
#include "cc/resources/raster_source.h"
#include "cc/resources/resource.h"
@@ -39,18 +39,22 @@ class RasterBufferImpl : public RasterBuffer {
// static
scoped_ptr<TileTaskWorkerPool> GpuTileTaskWorkerPool::Create(
base::SequencedTaskRunner* task_runner,
- TaskGraphRunner* task_graph_runner) {
+ TaskGraphRunner* task_graph_runner,
+ ResourceProvider* resource_provider) {
return make_scoped_ptr<TileTaskWorkerPool>(
- new GpuTileTaskWorkerPool(task_runner, task_graph_runner));
+ new GpuTileTaskWorkerPool(
+ task_runner, task_graph_runner, resource_provider));
}
// TODO(hendrikw): This class should be removed. See crbug.com/444938.
GpuTileTaskWorkerPool::GpuTileTaskWorkerPool(
base::SequencedTaskRunner* task_runner,
- TaskGraphRunner* task_graph_runner)
+ TaskGraphRunner* task_graph_runner,
+ ResourceProvider* resource_provider)
: task_runner_(task_runner),
task_graph_runner_(task_graph_runner),
namespace_token_(task_graph_runner_->GetNamespaceToken()),
+ resource_provider_(resource_provider),
task_set_finished_weak_ptr_factory_(this),
weak_ptr_factory_(this) {
}
@@ -140,6 +144,10 @@ void GpuTileTaskWorkerPool::CheckForCompletedTasks() {
completed_tasks_.clear();
}
+ResourceFormat GpuTileTaskWorkerPool::GetResourceFormat() {
+ return resource_provider_->best_texture_format();
+}
+
void GpuTileTaskWorkerPool::CompleteTasks(const Task::Vector& tasks) {
for (auto& task : tasks) {
RasterTask* raster_task = static_cast<RasterTask*>(task.get());
« no previous file with comments | « cc/resources/gpu_tile_task_worker_pool.h ('k') | cc/resources/one_copy_tile_task_worker_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698