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

Unified Diff: cc/resources/image_raster_worker_pool.h

Issue 16190002: cc: Add new RasterWorkerPool interface. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: pass unit tests Created 7 years, 7 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/image_raster_worker_pool.h
diff --git a/cc/resources/image_raster_worker_pool.h b/cc/resources/image_raster_worker_pool.h
new file mode 100644
index 0000000000000000000000000000000000000000..c6dcb9bd457988a4f07d9af0ebe99a331ef5d812
--- /dev/null
+++ b/cc/resources/image_raster_worker_pool.h
@@ -0,0 +1,48 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_RESOURCES_IMAGE_RASTER_WORKER_POOL_H_
+#define CC_RESOURCES_IMAGE_RASTER_WORKER_POOL_H_
+
+#include "cc/resources/raster_worker_pool.h"
+
+namespace cc {
+
+class ImageRasterWorkerPool : public RasterWorkerPool,
+ public WorkerPoolClient {
+ public:
+ virtual ~ImageRasterWorkerPool();
+
+ static scoped_ptr<RasterWorkerPool> Create(
+ ResourceProvider* resource_provider,
+ size_t num_threads) {
+ return make_scoped_ptr<RasterWorkerPool>(
+ new ImageRasterWorkerPool(resource_provider, num_threads));
+ }
+
+ // Overridden from WorkerPool:
+ virtual void Shutdown() OVERRIDE;
+
+ // Overridden from RasterWorkerPool:
+ virtual void ScheduleTasks(RasterTask::Queue* queue) OVERRIDE;
+
+ private:
+ ImageRasterWorkerPool(ResourceProvider* resource_provider,
+ size_t num_threads);
+
+ // Overridden from WorkerPoolClient:
+ virtual void DidFinishDispatchingWorkerPoolCompletionCallbacks() OVERRIDE;
+
+ void OnRasterTaskCompleted(
+ scoped_refptr<internal::RasterWorkerPoolTask> task,
+ bool was_canceled,
+ bool need_bind);
kaanb 2013/05/29 21:04:15 nit: s/need/needs/ here and elsewhere
reveman 2013/05/30 01:46:10 Done.
+ void DidFinishRasterTask(internal::RasterWorkerPoolTask* task);
+
+ DISALLOW_COPY_AND_ASSIGN(ImageRasterWorkerPool);
+};
+
+} // namespace cc
+
+#endif // CC_RESOURCES_IMAGE_RASTER_WORKER_POOL_H_

Powered by Google App Engine
This is Rietveld 408576698