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