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

Unified Diff: cc/resources/pixel_buffer_raster_worker_pool.h

Issue 17351017: Re-land: cc: Add raster finished signals to RasterWorkerPool. (Closed) Base URL: http://git.chromium.org/chromium/src.git@new-graph-build
Patch Set: fix flaky unit tests Created 7 years, 6 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
« no previous file with comments | « cc/resources/image_raster_worker_pool.cc ('k') | cc/resources/pixel_buffer_raster_worker_pool.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 be609a832c377906ffde9db88c78f281fff13e5b..d9613f7634d310553e026a40aafcde5188706067 100644
--- a/cc/resources/pixel_buffer_raster_worker_pool.h
+++ b/cc/resources/pixel_buffer_raster_worker_pool.h
@@ -7,6 +7,7 @@
#include <deque>
#include <set>
+#include <vector>
#include "cc/resources/raster_worker_pool.h"
@@ -28,14 +29,13 @@ class CC_EXPORT PixelBufferRasterWorkerPool : public RasterWorkerPool {
// Overridden from RasterWorkerPool:
virtual void ScheduleTasks(RasterTask::Queue* queue) OVERRIDE;
+ virtual void OnRasterTasksFinished() OVERRIDE;
+ virtual void OnRasterTasksRequiredForActivationFinished() OVERRIDE;
private:
PixelBufferRasterWorkerPool(ResourceProvider* resource_provider,
size_t num_threads);
- // Overridden from RasterWorkerPool:
- virtual void OnRasterTasksFinished() OVERRIDE;
-
void FlushUploads();
void CheckForCompletedUploads();
void ScheduleCheckForCompletedRasterTasks();
@@ -46,6 +46,13 @@ class CC_EXPORT PixelBufferRasterWorkerPool : public RasterWorkerPool {
bool was_canceled,
bool needs_upload);
void DidCompleteRasterTask(internal::RasterWorkerPoolTask* task);
+ unsigned PendingRasterTaskCount() const;
+ bool HasPendingTasks() const;
+ bool HasPendingTasksRequiredForActivation() const;
+
+ const char* StateName() const;
+ scoped_ptr<base::Value> StateAsValue() const;
+ scoped_ptr<base::Value> ThrottleStateAsValue() const;
bool shutdown_;
@@ -55,11 +62,18 @@ class CC_EXPORT PixelBufferRasterWorkerPool : public RasterWorkerPool {
TaskDeque tasks_with_pending_upload_;
TaskDeque completed_tasks_;
+ typedef std::set<internal::RasterWorkerPoolTask*> TaskSet;
+ TaskSet tasks_required_for_activation_;
+
+ size_t scheduled_raster_task_count_;
size_t bytes_pending_upload_;
bool has_performed_uploads_since_last_flush_;
base::CancelableClosure check_for_completed_raster_tasks_callback_;
bool check_for_completed_raster_tasks_pending_;
+ bool should_notify_client_if_no_tasks_are_pending_;
+ bool should_notify_client_if_no_tasks_required_for_activation_are_pending_;
+
DISALLOW_COPY_AND_ASSIGN(PixelBufferRasterWorkerPool);
};
« no previous file with comments | « cc/resources/image_raster_worker_pool.cc ('k') | cc/resources/pixel_buffer_raster_worker_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698