OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_COPY_RASTER_WORKER_POOL_H_ | 5 #ifndef CC_RESOURCES_IMAGE_COPY_RASTER_WORKER_POOL_H_ |
6 #define CC_RESOURCES_IMAGE_COPY_RASTER_WORKER_POOL_H_ | 6 #define CC_RESOURCES_IMAGE_COPY_RASTER_WORKER_POOL_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
11 #include "base/values.h" | 11 #include "base/values.h" |
12 #include "cc/output/context_provider.h" | 12 #include "cc/output/context_provider.h" |
13 #include "cc/resources/raster_worker_pool.h" | 13 #include "cc/resources/raster_worker_pool.h" |
14 #include "cc/resources/rasterizer.h" | 14 #include "cc/resources/rasterizer.h" |
15 | 15 |
| 16 namespace base { |
| 17 namespace debug { |
| 18 class ConvertableToTraceFormat; |
| 19 class TracedValue; |
| 20 } |
| 21 } |
| 22 |
16 namespace cc { | 23 namespace cc { |
17 class ResourcePool; | 24 class ResourcePool; |
18 class ResourceProvider; | 25 class ResourceProvider; |
19 class ScopedResource; | 26 class ScopedResource; |
20 | 27 |
21 class CC_EXPORT ImageCopyRasterWorkerPool : public RasterWorkerPool, | 28 class CC_EXPORT ImageCopyRasterWorkerPool : public RasterWorkerPool, |
22 public Rasterizer, | 29 public Rasterizer, |
23 public RasterizerTaskClient { | 30 public RasterizerTaskClient { |
24 public: | 31 public: |
25 virtual ~ImageCopyRasterWorkerPool(); | 32 virtual ~ImageCopyRasterWorkerPool(); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 RasterTaskState(const RasterTask* task, ScopedResource* resource) | 77 RasterTaskState(const RasterTask* task, ScopedResource* resource) |
71 : task(task), resource(resource) {} | 78 : task(task), resource(resource) {} |
72 | 79 |
73 const RasterTask* task; | 80 const RasterTask* task; |
74 ScopedResource* resource; | 81 ScopedResource* resource; |
75 }; | 82 }; |
76 | 83 |
77 void OnRasterFinished(); | 84 void OnRasterFinished(); |
78 void OnRasterRequiredForActivationFinished(); | 85 void OnRasterRequiredForActivationFinished(); |
79 void FlushCopies(); | 86 void FlushCopies(); |
80 scoped_ptr<base::Value> StateAsValue() const; | 87 scoped_refptr<base::debug::ConvertableToTraceFormat> StateAsValue() const; |
81 scoped_ptr<base::Value> StagingStateAsValue() const; | 88 void StagingStateAsValueInto(base::debug::TracedValue* staging_state) const; |
82 | 89 |
83 scoped_refptr<base::SequencedTaskRunner> task_runner_; | 90 scoped_refptr<base::SequencedTaskRunner> task_runner_; |
84 TaskGraphRunner* task_graph_runner_; | 91 TaskGraphRunner* task_graph_runner_; |
85 const NamespaceToken namespace_token_; | 92 const NamespaceToken namespace_token_; |
86 RasterizerClient* client_; | 93 RasterizerClient* client_; |
87 ContextProvider* context_provider_; | 94 ContextProvider* context_provider_; |
88 ResourceProvider* resource_provider_; | 95 ResourceProvider* resource_provider_; |
89 ResourcePool* resource_pool_; | 96 ResourcePool* resource_pool_; |
90 | 97 |
91 RasterTaskState::Vector raster_task_states_; | 98 RasterTaskState::Vector raster_task_states_; |
(...skipping 13 matching lines...) Expand all Loading... |
105 // completed tasks. | 112 // completed tasks. |
106 TaskGraph graph_; | 113 TaskGraph graph_; |
107 Task::Vector completed_tasks_; | 114 Task::Vector completed_tasks_; |
108 | 115 |
109 DISALLOW_COPY_AND_ASSIGN(ImageCopyRasterWorkerPool); | 116 DISALLOW_COPY_AND_ASSIGN(ImageCopyRasterWorkerPool); |
110 }; | 117 }; |
111 | 118 |
112 } // namespace cc | 119 } // namespace cc |
113 | 120 |
114 #endif // CC_RESOURCES_IMAGE_COPY_RASTER_WORKER_POOL_H_ | 121 #endif // CC_RESOURCES_IMAGE_COPY_RASTER_WORKER_POOL_H_ |
OLD | NEW |