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

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: Renaming 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..a2451a9cbda58a1cd51607943b652f92e1e45b32 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 DidFinishRunningTasks(TaskSet task_set) = 0;
+ virtual TaskSetCollection TasksThatShouldBeForcedToComplete() const = 0;
+ virtual base::debug::TraceEventSyntheticDelay* SyntheticDelayForTasks(
+ 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;
reveman 2014/09/10 19:41:28 Should it be allowed to have a task not be part of
ernstm 2014/09/11 21:15:53 Yes, and we do have that situation. See pixel_buff
};
RasterTaskQueue();
@@ -127,7 +135,6 @@ struct CC_EXPORT RasterTaskQueue {
void Reset();
Item::Vector items;
- size_t required_for_activation_count;
reveman 2014/09/12 16:33:51 If we need to add the count back here, then please
};
// This interface can be used to schedule and run raster tasks. The client will

Powered by Google App Engine
This is Rietveld 408576698