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

Unified Diff: cc/resources/rasterizer.h

Issue 523243002: cc: Generalize raster task notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clean-ups Created 6 years, 3 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/rasterizer.h
diff --git a/cc/resources/rasterizer.h b/cc/resources/rasterizer.h
index f59e72f45ab3e46c9bf2e52c609d2723c6e4aaa4..105b728dd1c5cfadb9ddb7b81b1a8ba3c8d71354 100644
--- a/cc/resources/rasterizer.h
+++ b/cc/resources/rasterizer.h
@@ -5,6 +5,7 @@
#ifndef CC_RESOURCES_RASTERIZER_H_
#define CC_RESOURCES_RASTERIZER_H_
+#include <bitset>
#include <vector>
#include "base/callback.h"
@@ -85,11 +86,14 @@ class CC_EXPORT RasterTask : public RasterizerTask {
ImageDecodeTask::Vector dependencies_;
};
+static const size_t kNumberOfTaskSets = 2;
+typedef size_t TaskSet;
+typedef std::bitset<kNumberOfTaskSets> TaskSetCollection;
+
class CC_EXPORT RasterizerClient {
public:
- virtual bool ShouldForceTasksRequiredForActivationToComplete() const = 0;
- virtual void DidFinishRunningTasks() = 0;
- virtual void DidFinishRunningTasksRequiredForActivation() = 0;
+ virtual void DidFinishRunningTasks(TaskSet task_set) = 0;
+ virtual TaskSetCollection TasksThatShouldBeForcedToComplete() const = 0;
protected:
virtual ~RasterizerClient() {}
@@ -109,15 +113,11 @@ struct CC_EXPORT RasterTaskQueue {
typedef std::vector<Item> Vector;
- Item(RasterTask* task, bool required_for_activation);
+ Item(RasterTask* task, const TaskSetCollection& task_sets);
~Item();
- static bool IsRequiredForActivation(const Item& item) {
- return item.required_for_activation;
- }
-
RasterTask* task;
- bool required_for_activation;
+ TaskSetCollection task_sets;
};
RasterTaskQueue();

Powered by Google App Engine
This is Rietveld 408576698