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

Unified Diff: cc/resources/raster_worker_pool.h

Issue 73923003: Shared Raster Worker Threads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments + nits Created 6 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
Index: cc/resources/raster_worker_pool.h
diff --git a/cc/resources/raster_worker_pool.h b/cc/resources/raster_worker_pool.h
old mode 100644
new mode 100755
index fac2fd845ce81db11136a986f0437db89f6e8867..306eebb50413d1109de8bff8bbb2afda42d096b3
--- a/cc/resources/raster_worker_pool.h
+++ b/cc/resources/raster_worker_pool.h
@@ -188,6 +188,11 @@ class CC_EXPORT RasterWorkerPool : public WorkerPool {
// Returns the format that needs to be used for raster task resources.
virtual ResourceFormat GetResourceFormat() const = 0;
+ // Sets the number of threads to use for running raster tasks.
+ // Can only be called once prior to GetNumRasterThreads().
+ // Caller is responsible for correct ordering.
+ static void SetNumRasterThreads(int num_threads);
+
// TODO(vmpstr): Figure out an elegant way to not pass this many parameters.
static RasterTask CreateRasterTask(
const Resource* resource,
@@ -218,7 +223,7 @@ class CC_EXPORT RasterWorkerPool : public WorkerPool {
typedef base::hash_map<TaskMapKey,
scoped_refptr<internal::WorkerPoolTask> > TaskMap;
- RasterWorkerPool(ResourceProvider* resource_provider, size_t num_threads);
+ explicit RasterWorkerPool(ResourceProvider* resource_provider);
virtual void OnRasterTasksFinished() = 0;
virtual void OnRasterTasksRequiredForActivationFinished() = 0;

Powered by Google App Engine
This is Rietveld 408576698