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

Unified Diff: cc/resources/tile_task_runner.h

Issue 786583002: cc: Renaming Rasterizer and RasterWorkerPool interfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test. Update include files alphabetic orders. Created 6 years 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/tile_manager_perftest.cc ('k') | cc/resources/tile_task_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/tile_task_runner.h
diff --git a/cc/resources/rasterizer.h b/cc/resources/tile_task_runner.h
similarity index 70%
rename from cc/resources/rasterizer.h
rename to cc/resources/tile_task_runner.h
index db84c2223eba9566a2b7e5218b3bef8762cceafe..1de0f4f54dad8bb387cb5e25698c2a6c12cb5e96 100644
--- a/cc/resources/rasterizer.h
+++ b/cc/resources/tile_task_runner.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CC_RESOURCES_RASTERIZER_H_
-#define CC_RESOURCES_RASTERIZER_H_
+#ifndef CC_RESOURCES_TILE_TASK_RUNNER_H_
+#define CC_RESOURCES_TILE_TASK_RUNNER_H_
#include <bitset>
#include <vector>
@@ -18,22 +18,22 @@ class RasterTask;
class Resource;
class RasterBuffer;
-class CC_EXPORT RasterizerTaskClient {
+class CC_EXPORT TileTaskClient {
public:
virtual scoped_ptr<RasterBuffer> AcquireBufferForRaster(
const Resource* resource) = 0;
virtual void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) = 0;
protected:
- virtual ~RasterizerTaskClient() {}
+ virtual ~TileTaskClient() {}
};
-class CC_EXPORT RasterizerTask : public Task {
+class CC_EXPORT TileTask : public Task {
public:
- typedef std::vector<scoped_refptr<RasterizerTask>> Vector;
+ typedef std::vector<scoped_refptr<TileTask>> Vector;
- virtual void ScheduleOnOriginThread(RasterizerTaskClient* client) = 0;
- virtual void CompleteOnOriginThread(RasterizerTaskClient* client) = 0;
+ virtual void ScheduleOnOriginThread(TileTaskClient* client) = 0;
+ virtual void CompleteOnOriginThread(TileTaskClient* client) = 0;
virtual void RunReplyOnOriginThread() = 0;
// Type-checking downcast routines.
@@ -49,18 +49,18 @@ class CC_EXPORT RasterizerTask : public Task {
bool HasCompleted() const;
protected:
- RasterizerTask();
- ~RasterizerTask() override;
+ TileTask();
+ ~TileTask() override;
bool did_schedule_;
bool did_complete_;
};
-class CC_EXPORT ImageDecodeTask : public RasterizerTask {
+class CC_EXPORT ImageDecodeTask : public TileTask {
public:
typedef std::vector<scoped_refptr<ImageDecodeTask>> Vector;
- // Overridden from RasterizerTask:
+ // Overridden from TileTask:
ImageDecodeTask* AsImageDecodeTask() override;
protected:
@@ -68,11 +68,11 @@ class CC_EXPORT ImageDecodeTask : public RasterizerTask {
~ImageDecodeTask() override;
};
-class CC_EXPORT RasterTask : public RasterizerTask {
+class CC_EXPORT RasterTask : public TileTask {
reveman 2014/12/09 04:53:09 This will be renamed to PrepareTask or something l
vmiura 2014/12/09 18:15:28 Yes I think so.
public:
typedef std::vector<scoped_refptr<RasterTask>> Vector;
- // Overridden from RasterizerTask:
+ // Overridden from TileTask:
RasterTask* AsRasterTask() override;
const Resource* resource() const { return resource_; }
@@ -95,16 +95,16 @@ static const size_t kNumberOfTaskSets = 3;
typedef size_t TaskSet;
typedef std::bitset<kNumberOfTaskSets> TaskSetCollection;
-class CC_EXPORT RasterizerClient {
+class CC_EXPORT TileTaskRunnerClient {
public:
- virtual void DidFinishRunningTasks(TaskSet task_set) = 0;
+ virtual void DidFinishRunningTileTasks(TaskSet task_set) = 0;
virtual TaskSetCollection TasksThatShouldBeForcedToComplete() const = 0;
protected:
- virtual ~RasterizerClient() {}
+ virtual ~TileTaskRunnerClient() {}
};
-struct CC_EXPORT RasterTaskQueue {
+struct CC_EXPORT TileTaskQueue {
struct CC_EXPORT Item {
class TaskComparator {
public:
@@ -125,44 +125,45 @@ struct CC_EXPORT RasterTaskQueue {
TaskSetCollection task_sets;
};
- RasterTaskQueue();
- ~RasterTaskQueue();
+ TileTaskQueue();
+ ~TileTaskQueue();
- void Swap(RasterTaskQueue* other);
+ void Swap(TileTaskQueue* other);
void Reset();
Item::Vector items;
};
-// This interface can be used to schedule and run raster tasks. The client will
+// This interface can be used to schedule and run tile tasks. The client will
// be notified asynchronously when the set of tasks marked as "required for
-// activation" have finished running and when all scheduled tasks have finished
-// running. The client can call CheckForCompletedTasks() at any time to dispatch
+// activation" have finished running, when tasks marked "required for draw"
+// have finished running, and when all scheduled tasks have finished running.
+// The client can call CheckForCompletedTasks() at any time to dispatch
// pending completion callbacks for all tasks that have finished running.
-class CC_EXPORT Rasterizer {
+class CC_EXPORT TileTaskRunner {
public:
// Set the client instance to be notified when finished running tasks.
- virtual void SetClient(RasterizerClient* client) = 0;
+ virtual void SetClient(TileTaskRunnerClient* client) = 0;
// Tells the worker pool to shutdown after canceling all previously scheduled
// tasks. Reply callbacks are still guaranteed to run when
// CheckForCompletedTasks() is called.
virtual void Shutdown() = 0;
- // Schedule running of raster tasks in |queue| and all dependencies.
+ // Schedule running of tile tasks in |queue| and all dependencies.
// Previously scheduled tasks that are not in |queue| will be canceled unless
// already running. Once scheduled, reply callbacks are guaranteed to run for
// all tasks even if they later get canceled by another call to
// ScheduleTasks().
- virtual void ScheduleTasks(RasterTaskQueue* queue) = 0;
+ virtual void ScheduleTasks(TileTaskQueue* queue) = 0;
// Check for completed tasks and dispatch reply callbacks.
virtual void CheckForCompletedTasks() = 0;
protected:
- virtual ~Rasterizer() {}
+ virtual ~TileTaskRunner() {}
};
} // namespace cc
-#endif // CC_RESOURCES_RASTERIZER_H_
+#endif // CC_RESOURCES_TILE_TASK_RUNNER_H_
« no previous file with comments | « cc/resources/tile_manager_perftest.cc ('k') | cc/resources/tile_task_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698