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

Side by Side Diff: cc/resources/pixel_buffer_raster_worker_pool.h

Issue 99873007: cc: Simplify raster task completion notification logic (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_RESOURCES_PIXEL_BUFFER_RASTER_WORKER_POOL_H_ 5 #ifndef CC_RESOURCES_PIXEL_BUFFER_RASTER_WORKER_POOL_H_
6 #define CC_RESOURCES_PIXEL_BUFFER_RASTER_WORKER_POOL_H_ 6 #define CC_RESOURCES_PIXEL_BUFFER_RASTER_WORKER_POOL_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 26 matching lines...) Expand all
37 virtual GLenum GetResourceTarget() const OVERRIDE; 37 virtual GLenum GetResourceTarget() const OVERRIDE;
38 virtual ResourceFormat GetResourceFormat() const OVERRIDE; 38 virtual ResourceFormat GetResourceFormat() const OVERRIDE;
39 virtual void OnRasterTasksFinished() OVERRIDE; 39 virtual void OnRasterTasksFinished() OVERRIDE;
40 virtual void OnRasterTasksRequiredForActivationFinished() OVERRIDE; 40 virtual void OnRasterTasksRequiredForActivationFinished() OVERRIDE;
41 41
42 private: 42 private:
43 PixelBufferRasterWorkerPool(ResourceProvider* resource_provider, 43 PixelBufferRasterWorkerPool(ResourceProvider* resource_provider,
44 size_t num_threads, 44 size_t num_threads,
45 size_t max_transfer_buffer_usage_bytes); 45 size_t max_transfer_buffer_usage_bytes);
46 46
47 enum TaskQueueCompletionStatus {
48 TASKS_PENDING,
49 TASKS_REQUIRED_FOR_ACTIVATION_COMPLETED,
50 ALL_TASKS_COMPLETED
51 };
52
47 void FlushUploads(); 53 void FlushUploads();
48 void CheckForCompletedUploads(); 54 void CheckForCompletedUploads();
49 void ScheduleCheckForCompletedRasterTasks(); 55 void ScheduleCheckForCompletedRasterTasks();
50 void CheckForCompletedRasterTasks(); 56 TaskQueueCompletionStatus CheckForCompletedRasterTasks();
51 void ScheduleMoreTasks(); 57 void ScheduleMoreTasks();
52 void OnRasterTaskCompleted( 58 void OnRasterTaskCompleted(
53 scoped_refptr<internal::RasterWorkerPoolTask> task, 59 scoped_refptr<internal::RasterWorkerPoolTask> task,
54 bool was_canceled, 60 bool was_canceled,
55 bool needs_upload); 61 bool needs_upload);
56 void DidCompleteRasterTask(internal::RasterWorkerPoolTask* task); 62 void DidCompleteRasterTask(internal::RasterWorkerPoolTask* task);
57 unsigned PendingRasterTaskCount() const; 63 unsigned PendingRasterTaskCount() const;
58 bool HasPendingTasks() const; 64 bool HasPendingTasks() const;
59 bool HasPendingTasksRequiredForActivation() const; 65 bool HasPendingTasksRequiredForActivation() const;
60 66
(...skipping 22 matching lines...) Expand all
83 bool should_notify_client_if_no_tasks_are_pending_; 89 bool should_notify_client_if_no_tasks_are_pending_;
84 bool should_notify_client_if_no_tasks_required_for_activation_are_pending_; 90 bool should_notify_client_if_no_tasks_required_for_activation_are_pending_;
85 ResourceFormat format_; 91 ResourceFormat format_;
86 92
87 DISALLOW_COPY_AND_ASSIGN(PixelBufferRasterWorkerPool); 93 DISALLOW_COPY_AND_ASSIGN(PixelBufferRasterWorkerPool);
88 }; 94 };
89 95
90 } // namespace cc 96 } // namespace cc
91 97
92 #endif // CC_RESOURCES_PIXEL_BUFFER_RASTER_WORKER_POOL_H_ 98 #endif // CC_RESOURCES_PIXEL_BUFFER_RASTER_WORKER_POOL_H_
OLDNEW
« no previous file with comments | « no previous file | cc/resources/pixel_buffer_raster_worker_pool.cc » ('j') | cc/resources/pixel_buffer_raster_worker_pool.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698