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

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

Issue 523243002: cc: Generalize raster task notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Renaming 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 unified diff | Download patch
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_IMAGE_RASTER_WORKER_POOL_H_ 5 #ifndef CC_RESOURCES_IMAGE_RASTER_WORKER_POOL_H_
6 #define CC_RESOURCES_IMAGE_RASTER_WORKER_POOL_H_ 6 #define CC_RESOURCES_IMAGE_RASTER_WORKER_POOL_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "cc/resources/raster_worker_pool.h" 10 #include "cc/resources/raster_worker_pool.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // Overridden from RasterizerTaskClient: 42 // Overridden from RasterizerTaskClient:
43 virtual RasterBuffer* AcquireBufferForRaster(RasterTask* task) OVERRIDE; 43 virtual RasterBuffer* AcquireBufferForRaster(RasterTask* task) OVERRIDE;
44 virtual void ReleaseBufferForRaster(RasterTask* task) OVERRIDE; 44 virtual void ReleaseBufferForRaster(RasterTask* task) OVERRIDE;
45 45
46 protected: 46 protected:
47 ImageRasterWorkerPool(base::SequencedTaskRunner* task_runner, 47 ImageRasterWorkerPool(base::SequencedTaskRunner* task_runner,
48 TaskGraphRunner* task_graph_runner, 48 TaskGraphRunner* task_graph_runner,
49 ResourceProvider* resource_provider); 49 ResourceProvider* resource_provider);
50 50
51 private: 51 private:
52 void OnRasterFinished(); 52 void OnRasterFinished(TaskSet task_set);
53 void OnRasterRequiredForActivationFinished();
54 scoped_refptr<base::debug::ConvertableToTraceFormat> StateAsValue() const; 53 scoped_refptr<base::debug::ConvertableToTraceFormat> StateAsValue() const;
55 54
56 scoped_refptr<base::SequencedTaskRunner> task_runner_; 55 scoped_refptr<base::SequencedTaskRunner> task_runner_;
57 TaskGraphRunner* task_graph_runner_; 56 TaskGraphRunner* task_graph_runner_;
58 const NamespaceToken namespace_token_; 57 const NamespaceToken namespace_token_;
59 RasterizerClient* client_; 58 RasterizerClient* client_;
60 ResourceProvider* resource_provider_; 59 ResourceProvider* resource_provider_;
61 60
62 bool raster_tasks_pending_; 61 TaskSetCollection raster_pending_;
63 bool raster_tasks_required_for_activation_pending_;
64 62
65 scoped_refptr<RasterizerTask> raster_finished_task_; 63 scoped_refptr<RasterizerTask> raster_finished_tasks_[kNumberOfTaskSets];
66 scoped_refptr<RasterizerTask> raster_required_for_activation_finished_task_;
67 64
68 // Task graph used when scheduling tasks and vector used to gather 65 // Task graph used when scheduling tasks and vector used to gather
69 // completed tasks. 66 // completed tasks.
70 TaskGraph graph_; 67 TaskGraph graph_;
71 Task::Vector completed_tasks_; 68 Task::Vector completed_tasks_;
72 69
73 base::WeakPtrFactory<ImageRasterWorkerPool> raster_finished_weak_ptr_factory_; 70 base::WeakPtrFactory<ImageRasterWorkerPool> raster_finished_weak_ptr_factory_;
74 71
75 DISALLOW_COPY_AND_ASSIGN(ImageRasterWorkerPool); 72 DISALLOW_COPY_AND_ASSIGN(ImageRasterWorkerPool);
76 }; 73 };
77 74
78 } // namespace cc 75 } // namespace cc
79 76
80 #endif // CC_RESOURCES_IMAGE_RASTER_WORKER_POOL_H_ 77 #endif // CC_RESOURCES_IMAGE_RASTER_WORKER_POOL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698