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_ONE_COPY_RASTER_WORKER_POOL_H_ | 5 #ifndef CC_RESOURCES_ONE_COPY_RASTER_WORKER_POOL_H_ |
6 #define CC_RESOURCES_ONE_COPY_RASTER_WORKER_POOL_H_ | 6 #define CC_RESOURCES_ONE_COPY_RASTER_WORKER_POOL_H_ |
7 | 7 |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 ~CopyOperation(); | 87 ~CopyOperation(); |
88 | 88 |
89 scoped_ptr<ResourceProvider::ScopedWriteLockGpuMemoryBuffer> write_lock; | 89 scoped_ptr<ResourceProvider::ScopedWriteLockGpuMemoryBuffer> write_lock; |
90 scoped_ptr<ScopedResource> src; | 90 scoped_ptr<ScopedResource> src; |
91 const Resource* dst; | 91 const Resource* dst; |
92 }; | 92 }; |
93 | 93 |
94 void OnRasterFinished(TaskSet task_set); | 94 void OnRasterFinished(TaskSet task_set); |
95 void AdvanceLastFlushedCopyTo(CopySequenceNumber sequence); | 95 void AdvanceLastFlushedCopyTo(CopySequenceNumber sequence); |
96 void IssueCopyOperations(int64 count); | 96 void IssueCopyOperations(int64 count); |
97 void ScheduleCheckForCompletedCopyOperationsWithLockAcquired(); | 97 void ScheduleCheckForCompletedCopyOperationsWithLockAcquired( |
98 void CheckForCompletedCopyOperations(); | 98 bool wait_if_needed); |
| 99 void CheckForCompletedCopyOperations(bool wait_if_needed); |
99 scoped_refptr<base::debug::ConvertableToTraceFormat> StateAsValue() const; | 100 scoped_refptr<base::debug::ConvertableToTraceFormat> StateAsValue() const; |
100 void StagingStateAsValueInto(base::debug::TracedValue* staging_state) const; | 101 void StagingStateAsValueInto(base::debug::TracedValue* staging_state) const; |
101 | 102 |
102 scoped_refptr<base::SequencedTaskRunner> task_runner_; | 103 scoped_refptr<base::SequencedTaskRunner> task_runner_; |
103 TaskGraphRunner* task_graph_runner_; | 104 TaskGraphRunner* task_graph_runner_; |
104 const NamespaceToken namespace_token_; | 105 const NamespaceToken namespace_token_; |
105 RasterizerClient* client_; | 106 RasterizerClient* client_; |
106 ContextProvider* context_provider_; | 107 ContextProvider* context_provider_; |
107 ResourceProvider* resource_provider_; | 108 ResourceProvider* resource_provider_; |
108 ResourcePool* resource_pool_; | 109 ResourcePool* resource_pool_; |
(...skipping 23 matching lines...) Expand all Loading... |
132 // canceled when ScheduleTasks() is called. | 133 // canceled when ScheduleTasks() is called. |
133 base::WeakPtrFactory<OneCopyRasterWorkerPool> | 134 base::WeakPtrFactory<OneCopyRasterWorkerPool> |
134 raster_finished_weak_ptr_factory_; | 135 raster_finished_weak_ptr_factory_; |
135 | 136 |
136 DISALLOW_COPY_AND_ASSIGN(OneCopyRasterWorkerPool); | 137 DISALLOW_COPY_AND_ASSIGN(OneCopyRasterWorkerPool); |
137 }; | 138 }; |
138 | 139 |
139 } // namespace cc | 140 } // namespace cc |
140 | 141 |
141 #endif // CC_RESOURCES_ONE_COPY_RASTER_WORKER_POOL_H_ | 142 #endif // CC_RESOURCES_ONE_COPY_RASTER_WORKER_POOL_H_ |
OLD | NEW |