| 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..56a50511cf008ccae4e30396ea32571a836746c1 100644
|
| --- a/cc/resources/pixel_buffer_raster_worker_pool.h
|
| +++ b/cc/resources/pixel_buffer_raster_worker_pool.h
|
| @@ -67,14 +67,26 @@ 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;
|
| + };
|
| +
|
| + class TaskSetSizes {
|
| + public:
|
| + TaskSetSizes();
|
| +
|
| + TaskSetCollection ToTaskSetCollection() const;
|
| + size_t& operator[](TaskSet task_set);
|
| + const size_t& operator[](TaskSet task_set) const;
|
| + bool operator==(const TaskSetSizes& other) const;
|
| + void operator+=(const TaskSetCollection& task_sets);
|
| + void operator-=(const TaskSetCollection& task_sets);
|
| +
|
| + private:
|
| + size_t sizes_[kNumberOfTaskSets];
|
| };
|
|
|
| typedef std::deque<scoped_refptr<RasterTask> > RasterTaskDeque;
|
| @@ -85,15 +97,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 +126,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.
|
|
|