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

Unified Diff: cc/resources/gpu_raster_worker_pool.cc

Issue 375303002: cc: Refactor ResourceProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixing typing error in build.gn Created 6 years, 5 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_raster_worker_pool.h ('k') | cc/resources/image_copy_raster_worker_pool.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/gpu_raster_worker_pool.cc
diff --git a/cc/resources/gpu_raster_worker_pool.cc b/cc/resources/gpu_raster_worker_pool.cc
index 70aab17e6b8a7e788b8ffcddead3c83dd8e1606e..218ba6ff87125f9eb04b4e14bf0f2ee171425cd9 100644
--- a/cc/resources/gpu_raster_worker_pool.cc
+++ b/cc/resources/gpu_raster_worker_pool.cc
@@ -8,6 +8,7 @@
#include "cc/output/context_provider.h"
#include "cc/resources/resource.h"
#include "cc/resources/resource_provider.h"
+#include "cc/resources/scoped_gpu_raster.h"
#include "gpu/command_buffer/client/gles2_interface.h"
#include "third_party/skia/include/gpu/GrContext.h"
@@ -16,16 +17,19 @@ namespace cc {
// static
scoped_ptr<RasterWorkerPool> GpuRasterWorkerPool::Create(
base::SequencedTaskRunner* task_runner,
+ ContextProvider* context_provider,
ResourceProvider* resource_provider) {
- return make_scoped_ptr<RasterWorkerPool>(
- new GpuRasterWorkerPool(task_runner, resource_provider));
+ return make_scoped_ptr<RasterWorkerPool>(new GpuRasterWorkerPool(
+ task_runner, context_provider, resource_provider));
}
GpuRasterWorkerPool::GpuRasterWorkerPool(base::SequencedTaskRunner* task_runner,
+ ContextProvider* context_provider,
ResourceProvider* resource_provider)
: task_runner_(task_runner),
task_graph_runner_(new TaskGraphRunner),
namespace_token_(task_graph_runner_->GetNamespaceToken()),
+ context_provider_(context_provider),
resource_provider_(resource_provider),
run_tasks_on_origin_thread_pending_(false),
raster_tasks_pending_(false),
@@ -185,7 +189,7 @@ void GpuRasterWorkerPool::RunTasksOnOriginThread() {
DCHECK(run_tasks_on_origin_thread_pending_);
run_tasks_on_origin_thread_pending_ = false;
- ResourceProvider::ScopedGpuRaster gpu_raster(resource_provider_);
+ ScopedGpuRaster gpu_raster(context_provider_);
task_graph_runner_->RunUntilIdle();
}
« no previous file with comments | « cc/resources/gpu_raster_worker_pool.h ('k') | cc/resources/image_copy_raster_worker_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698