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

Unified Diff: cc/resources/gpu_raster_worker_pool.cc

Issue 363563006: cc: Hide Gpu Rasterization details in Resource Provider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update unit/perf tests Create function for gpurasterworkerpool Created 6 years, 6 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/raster_worker_pool_perftest.cc » ('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 f26d827a306712750701d96f3e6047bc93714399..70aab17e6b8a7e788b8ffcddead3c83dd8e1606e 100644
--- a/cc/resources/gpu_raster_worker_pool.cc
+++ b/cc/resources/gpu_raster_worker_pool.cc
@@ -16,26 +16,22 @@ namespace cc {
// static
scoped_ptr<RasterWorkerPool> GpuRasterWorkerPool::Create(
base::SequencedTaskRunner* task_runner,
- ResourceProvider* resource_provider,
- ContextProvider* context_provider) {
- return make_scoped_ptr<RasterWorkerPool>(new GpuRasterWorkerPool(
- task_runner, resource_provider, context_provider));
+ ResourceProvider* resource_provider) {
+ return make_scoped_ptr<RasterWorkerPool>(
+ new GpuRasterWorkerPool(task_runner, resource_provider));
}
GpuRasterWorkerPool::GpuRasterWorkerPool(base::SequencedTaskRunner* task_runner,
- ResourceProvider* resource_provider,
- ContextProvider* context_provider)
+ ResourceProvider* resource_provider)
: task_runner_(task_runner),
task_graph_runner_(new TaskGraphRunner),
namespace_token_(task_graph_runner_->GetNamespaceToken()),
resource_provider_(resource_provider),
- context_provider_(context_provider),
run_tasks_on_origin_thread_pending_(false),
raster_tasks_pending_(false),
raster_tasks_required_for_activation_pending_(false),
raster_finished_weak_ptr_factory_(this),
weak_ptr_factory_(this) {
- DCHECK(context_provider_);
}
GpuRasterWorkerPool::~GpuRasterWorkerPool() {
@@ -189,25 +185,8 @@ void GpuRasterWorkerPool::RunTasksOnOriginThread() {
DCHECK(run_tasks_on_origin_thread_pending_);
run_tasks_on_origin_thread_pending_ = false;
- DCHECK(context_provider_->ContextGL());
- // TODO(alokp): Use a trace macro to push/pop markers.
- // Using push/pop functions directly incurs cost to evaluate function
- // arguments even when tracing is disabled.
- context_provider_->ContextGL()->PushGroupMarkerEXT(
- 0, "GpuRasterWorkerPool::RunTasksOnOriginThread");
-
- GrContext* gr_context = context_provider_->GrContext();
- // TODO(alokp): Implement TestContextProvider::GrContext().
- if (gr_context)
- gr_context->resetContext();
-
+ ResourceProvider::ScopedGpuRaster gpu_raster(resource_provider_);
task_graph_runner_->RunUntilIdle();
-
- // TODO(alokp): Implement TestContextProvider::GrContext().
- if (gr_context)
- gr_context->flush();
-
- context_provider_->ContextGL()->PopGroupMarkerEXT();
}
} // namespace cc
« no previous file with comments | « cc/resources/gpu_raster_worker_pool.h ('k') | cc/resources/raster_worker_pool_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698