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

Unified Diff: cc/resources/pixel_buffer_raster_worker_pool.h

Issue 523243002: cc: Generalize raster task notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more 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/pixel_buffer_raster_worker_pool.h
diff --git a/cc/resources/pixel_buffer_raster_worker_pool.h b/cc/resources/pixel_buffer_raster_worker_pool.h
index a251c302c7a140fe6f52f6377856a09ef01968ab..fd5df4f2967ebe0c29795280398bb605ef002802 100644
--- a/cc/resources/pixel_buffer_raster_worker_pool.h
+++ b/cc/resources/pixel_buffer_raster_worker_pool.h
@@ -67,14 +67,11 @@ class CC_EXPORT PixelBufferRasterWorkerPool : public RasterWorkerPool,
typedef std::vector<RasterTaskState> Vector;
- RasterTaskState(RasterTask* task, bool required_for_activation)
- : type(UNSCHEDULED),
- task(task),
- required_for_activation(required_for_activation) {}
+ RasterTaskState(RasterTask* task, const TaskSetCollection& task_sets);
enum { UNSCHEDULED, SCHEDULED, UPLOADING, COMPLETED } type;
RasterTask* task;
- bool required_for_activation;
+ TaskSetCollection task_sets;
};
typedef std::deque<scoped_refptr<RasterTask> > RasterTaskDeque;
@@ -85,15 +82,13 @@ class CC_EXPORT PixelBufferRasterWorkerPool : public RasterWorkerPool,
ResourceProvider* resource_provider,
size_t max_transfer_buffer_usage_bytes);
- void OnRasterFinished();
- void OnRasterRequiredForActivationFinished();
+ void OnRasterFinished(TaskSet task_set);
void FlushUploads();
void CheckForCompletedUploads();
void CheckForCompletedRasterTasks();
void ScheduleMoreTasks();
unsigned PendingRasterTaskCount() const;
- bool HasPendingTasks() const;
- bool HasPendingTasksRequiredForActivation() const;
+ TaskSetCollection PendingTasks() const;
void CheckForCompletedRasterizerTasks();
const char* StateName() const;
@@ -116,20 +111,17 @@ class CC_EXPORT PixelBufferRasterWorkerPool : public RasterWorkerPool,
RasterizerTask::Vector completed_image_decode_tasks_;
size_t scheduled_raster_task_count_;
- size_t raster_tasks_required_for_activation_count_;
+ size_t task_counts_[kNumberOfTaskSets];
size_t bytes_pending_upload_;
size_t max_bytes_pending_upload_;
bool has_performed_uploads_since_last_flush_;
- bool should_notify_client_if_no_tasks_are_pending_;
- bool should_notify_client_if_no_tasks_required_for_activation_are_pending_;
- bool raster_finished_task_pending_;
- bool raster_required_for_activation_finished_task_pending_;
+ TaskSetCollection should_notify_client_if_no_tasks_are_pending_;
+ TaskSetCollection raster_finished_tasks_pending_;
DelayedUniqueNotifier check_for_completed_raster_task_notifier_;
- scoped_refptr<RasterizerTask> raster_finished_task_;
- scoped_refptr<RasterizerTask> raster_required_for_activation_finished_task_;
+ scoped_refptr<RasterizerTask> raster_finished_tasks_[kNumberOfTaskSets];
// Task graph used when scheduling tasks and vector used to gather
// completed tasks.

Powered by Google App Engine
This is Rietveld 408576698