Index: cc/resources/rasterizer.h |
diff --git a/cc/resources/rasterizer.h b/cc/resources/rasterizer.h |
index c718eb9be9e3515aed6fac57856b1df564af63fc..e215fc42128de3672ddad8c7572ad706cb39daed 100644 |
--- a/cc/resources/rasterizer.h |
+++ b/cc/resources/rasterizer.h |
@@ -5,12 +5,19 @@ |
#ifndef CC_RESOURCES_RASTERIZER_H_ |
#define CC_RESOURCES_RASTERIZER_H_ |
+#include <bitset> |
#include <vector> |
#include "base/callback.h" |
#include "cc/resources/resource_format.h" |
#include "cc/resources/task_graph_runner.h" |
+namespace base { |
+namespace debug { |
+class TraceEventSyntheticDelay; |
+} |
+} |
+ |
namespace cc { |
class ImageDecodeTask; |
class RasterTask; |
@@ -85,11 +92,16 @@ class CC_EXPORT RasterTask : public RasterizerTask { |
ImageDecodeTask::Vector dependencies_; |
}; |
+static const size_t kNumberOfTaskSets = 3; |
+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 DidFinishRunningTaskSet(TaskSet task_set) = 0; |
ernstm
2014/09/10 18:26:19
I also renamed this to DidFinishRunningTasks(TaskS
|
+ virtual TaskSetCollection TasksThatShouldBeForcedToComplete() const = 0; |
+ virtual base::debug::TraceEventSyntheticDelay* SyntheticDelayForTaskSet( |
ernstm
2014/09/10 18:26:19
and renamed this to SyntheticDelayForTasks(TaskSet
|
+ TaskSet task_set) const = 0; |
protected: |
virtual ~RasterizerClient() {} |
@@ -109,15 +121,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(); |
@@ -127,7 +135,6 @@ struct CC_EXPORT RasterTaskQueue { |
void Reset(); |
Item::Vector items; |
- size_t required_for_activation_count; |
}; |
// This interface can be used to schedule and run raster tasks. The client will |