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

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: Remove obsolete HasPendingTasks 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 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

Powered by Google App Engine
This is Rietveld 408576698