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

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: Rebase for Commit 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
index 07d47d796588e7e78ae2064f4655477fa354b8b3..b25be8c13a6f30012f6ccd5958705ec5e4280b2b 100644
--- a/cc/resources/raster_worker_pool.h
+++ b/cc/resources/raster_worker_pool.h
@@ -192,6 +192,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);
+
// Force a check for completed raster tasks.
// Calls completion callbacks on completed tasks.
virtual void CheckForCompletedTasks();
@@ -230,8 +235,7 @@ class CC_EXPORT RasterWorkerPool : public WorkerPool {
scoped_refptr<internal::WorkerPoolTask> > TaskMap;
RasterWorkerPool(ResourceProvider* resource_provider,
- ContextProvider* context_provider,
- size_t num_threads);
+ ContextProvider* context_provider);
virtual void OnRasterTasksFinished() = 0;
virtual void OnRasterTasksRequiredForActivationFinished() = 0;

Powered by Google App Engine
This is Rietveld 408576698