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

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

Issue 18614012: cc: Fix incorrect completion of tiles and missing "ready to activate" signal. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: vmpstr's review Created 7 years, 5 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 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_RASTER_WORKER_POOL_H_ 5 #ifndef CC_RESOURCES_RASTER_WORKER_POOL_H_
6 #define CC_RESOURCES_RASTER_WORKER_POOL_H_ 6 #define CC_RESOURCES_RASTER_WORKER_POOL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 static Task CreateImageDecodeTask( 202 static Task CreateImageDecodeTask(
203 skia::LazyPixelRef* pixel_ref, 203 skia::LazyPixelRef* pixel_ref,
204 int layer_id, 204 int layer_id,
205 RenderingStatsInstrumentation* stats_instrumentation, 205 RenderingStatsInstrumentation* stats_instrumentation,
206 const Task::Reply& reply); 206 const Task::Reply& reply);
207 207
208 protected: 208 protected:
209 typedef std::vector<scoped_refptr<internal::WorkerPoolTask> > TaskVector; 209 typedef std::vector<scoped_refptr<internal::WorkerPoolTask> > TaskVector;
210 typedef std::vector<scoped_refptr<internal::RasterWorkerPoolTask> > 210 typedef std::vector<scoped_refptr<internal::RasterWorkerPoolTask> >
211 RasterTaskVector; 211 RasterTaskVector;
212 typedef base::hash_set<internal::RasterWorkerPoolTask*> RasterTaskSet;
212 typedef internal::RasterWorkerPoolTask* TaskMapKey; 213 typedef internal::RasterWorkerPoolTask* TaskMapKey;
213 typedef base::hash_map<TaskMapKey, 214 typedef base::hash_map<TaskMapKey,
214 scoped_refptr<internal::WorkerPoolTask> > TaskMap; 215 scoped_refptr<internal::WorkerPoolTask> > TaskMap;
215 216
216 RasterWorkerPool(ResourceProvider* resource_provider, size_t num_threads); 217 RasterWorkerPool(ResourceProvider* resource_provider, size_t num_threads);
217 218
218 virtual void OnRasterTasksFinished() = 0; 219 virtual void OnRasterTasksFinished() = 0;
219 virtual void OnRasterTasksRequiredForActivationFinished() = 0; 220 virtual void OnRasterTasksRequiredForActivationFinished() = 0;
220 221
221 void SetRasterTasks(RasterTask::Queue* queue); 222 void SetRasterTasks(RasterTask::Queue* queue);
222 bool IsRasterTaskRequiredForActivation( 223 bool IsRasterTaskRequiredForActivation(
223 internal::RasterWorkerPoolTask* task) const; 224 internal::RasterWorkerPoolTask* task) const;
224 225
225 RasterWorkerPoolClient* client() const { return client_; } 226 RasterWorkerPoolClient* client() const { return client_; }
226 ResourceProvider* resource_provider() const { return resource_provider_; } 227 ResourceProvider* resource_provider() const { return resource_provider_; }
227 const RasterTask::Queue::TaskVector& raster_tasks() const { 228 const RasterTaskVector& raster_tasks() const { return raster_tasks_; }
228 return raster_tasks_; 229 const RasterTaskSet& raster_tasks_required_for_activation() const {
230 return raster_tasks_required_for_activation_;
229 } 231 }
230 void set_raster_finished_task( 232 void set_raster_finished_task(
231 scoped_refptr<internal::WorkerPoolTask> raster_finished_task) { 233 scoped_refptr<internal::WorkerPoolTask> raster_finished_task) {
232 raster_finished_task_ = raster_finished_task; 234 raster_finished_task_ = raster_finished_task;
233 } 235 }
234 void set_raster_required_for_activation_finished_task( 236 void set_raster_required_for_activation_finished_task(
235 scoped_refptr<internal::WorkerPoolTask> 237 scoped_refptr<internal::WorkerPoolTask>
236 raster_required_for_activation_finished_task) { 238 raster_required_for_activation_finished_task) {
237 raster_required_for_activation_finished_task_ = 239 raster_required_for_activation_finished_task_ =
238 raster_required_for_activation_finished_task; 240 raster_required_for_activation_finished_task;
(...skipping 28 matching lines...) Expand all
267 269
268 base::WeakPtrFactory<RasterWorkerPool> weak_ptr_factory_; 270 base::WeakPtrFactory<RasterWorkerPool> weak_ptr_factory_;
269 scoped_refptr<internal::WorkerPoolTask> raster_finished_task_; 271 scoped_refptr<internal::WorkerPoolTask> raster_finished_task_;
270 scoped_refptr<internal::WorkerPoolTask> 272 scoped_refptr<internal::WorkerPoolTask>
271 raster_required_for_activation_finished_task_; 273 raster_required_for_activation_finished_task_;
272 }; 274 };
273 275
274 } // namespace cc 276 } // namespace cc
275 277
276 #endif // CC_RESOURCES_RASTER_WORKER_POOL_H_ 278 #endif // CC_RESOURCES_RASTER_WORKER_POOL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698