OLD | NEW |
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 <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "cc/base/delayed_unique_notifier.h" | 13 #include "cc/base/delayed_unique_notifier.h" |
14 #include "cc/output/context_provider.h" | 14 #include "cc/output/context_provider.h" |
15 #include "cc/resources/raster_worker_pool.h" | 15 #include "cc/resources/raster_worker_pool.h" |
16 #include "cc/resources/rasterizer.h" | 16 #include "cc/resources/rasterizer.h" |
17 | 17 |
| 18 namespace base { |
| 19 namespace debug { |
| 20 class ConvertableToTraceFormat; |
| 21 class TracedValue; |
| 22 } |
| 23 } |
| 24 |
18 namespace cc { | 25 namespace cc { |
19 class ResourceProvider; | 26 class ResourceProvider; |
20 | 27 |
21 class CC_EXPORT PixelBufferRasterWorkerPool : public RasterWorkerPool, | 28 class CC_EXPORT PixelBufferRasterWorkerPool : public RasterWorkerPool, |
22 public Rasterizer, | 29 public Rasterizer, |
23 public RasterizerTaskClient { | 30 public RasterizerTaskClient { |
24 public: | 31 public: |
25 virtual ~PixelBufferRasterWorkerPool(); | 32 virtual ~PixelBufferRasterWorkerPool(); |
26 | 33 |
27 static scoped_ptr<RasterWorkerPool> Create( | 34 static scoped_ptr<RasterWorkerPool> Create( |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 void FlushUploads(); | 90 void FlushUploads(); |
84 void CheckForCompletedUploads(); | 91 void CheckForCompletedUploads(); |
85 void CheckForCompletedRasterTasks(); | 92 void CheckForCompletedRasterTasks(); |
86 void ScheduleMoreTasks(); | 93 void ScheduleMoreTasks(); |
87 unsigned PendingRasterTaskCount() const; | 94 unsigned PendingRasterTaskCount() const; |
88 bool HasPendingTasks() const; | 95 bool HasPendingTasks() const; |
89 bool HasPendingTasksRequiredForActivation() const; | 96 bool HasPendingTasksRequiredForActivation() const; |
90 void CheckForCompletedRasterizerTasks(); | 97 void CheckForCompletedRasterizerTasks(); |
91 | 98 |
92 const char* StateName() const; | 99 const char* StateName() const; |
93 scoped_ptr<base::Value> StateAsValue() const; | 100 scoped_refptr<base::debug::ConvertableToTraceFormat> StateAsValue() const; |
94 scoped_ptr<base::Value> ThrottleStateAsValue() const; | 101 void ThrottleStateAsValueInto(base::debug::TracedValue* throttle_state) const; |
95 | 102 |
96 scoped_refptr<base::SequencedTaskRunner> task_runner_; | 103 scoped_refptr<base::SequencedTaskRunner> task_runner_; |
97 TaskGraphRunner* task_graph_runner_; | 104 TaskGraphRunner* task_graph_runner_; |
98 const NamespaceToken namespace_token_; | 105 const NamespaceToken namespace_token_; |
99 RasterizerClient* client_; | 106 RasterizerClient* client_; |
100 ContextProvider* context_provider_; | 107 ContextProvider* context_provider_; |
101 ResourceProvider* resource_provider_; | 108 ResourceProvider* resource_provider_; |
102 | 109 |
103 bool shutdown_; | 110 bool shutdown_; |
104 | 111 |
(...skipping 26 matching lines...) Expand all Loading... |
131 // completed tasks. | 138 // completed tasks. |
132 TaskGraph graph_; | 139 TaskGraph graph_; |
133 Task::Vector completed_tasks_; | 140 Task::Vector completed_tasks_; |
134 | 141 |
135 DISALLOW_COPY_AND_ASSIGN(PixelBufferRasterWorkerPool); | 142 DISALLOW_COPY_AND_ASSIGN(PixelBufferRasterWorkerPool); |
136 }; | 143 }; |
137 | 144 |
138 } // namespace cc | 145 } // namespace cc |
139 | 146 |
140 #endif // CC_RESOURCES_PIXEL_BUFFER_RASTER_WORKER_POOL_H_ | 147 #endif // CC_RESOURCES_PIXEL_BUFFER_RASTER_WORKER_POOL_H_ |
OLD | NEW |