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 GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ |
6 #define GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 29 matching lines...) Expand all Loading... |
40 #if defined(OS_ANDROID) | 40 #if defined(OS_ANDROID) |
41 namespace gfx { | 41 namespace gfx { |
42 class SurfaceTexture; | 42 class SurfaceTexture; |
43 } | 43 } |
44 namespace gpu { | 44 namespace gpu { |
45 class StreamTextureManagerInProcess; | 45 class StreamTextureManagerInProcess; |
46 } | 46 } |
47 #endif | 47 #endif |
48 | 48 |
49 namespace gpu { | 49 namespace gpu { |
| 50 class SyncPointClient; |
50 class SyncPointManager; | 51 class SyncPointManager; |
51 class ValueStateMap; | 52 class ValueStateMap; |
52 | 53 |
53 namespace gles2 { | 54 namespace gles2 { |
54 class FramebufferCompletenessCache; | 55 class FramebufferCompletenessCache; |
55 class GLES2Decoder; | 56 class GLES2Decoder; |
56 class MailboxManager; | 57 class MailboxManager; |
57 class ProgramCache; | 58 class ProgramCache; |
58 class ShaderTranslatorCache; | 59 class ShaderTranslatorCache; |
59 class SubscriptionRefSet; | 60 class SubscriptionRefSet; |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 size(size), | 195 size(size), |
195 attribs(attribs), | 196 attribs(attribs), |
196 gpu_preference(gpu_preference), | 197 gpu_preference(gpu_preference), |
197 capabilities(capabilities), | 198 capabilities(capabilities), |
198 context_group(share_group), | 199 context_group(share_group), |
199 image_factory(image_factory) {} | 200 image_factory(image_factory) {} |
200 }; | 201 }; |
201 | 202 |
202 bool InitializeOnGpuThread(const InitializeOnGpuThreadParams& params); | 203 bool InitializeOnGpuThread(const InitializeOnGpuThreadParams& params); |
203 bool DestroyOnGpuThread(); | 204 bool DestroyOnGpuThread(); |
204 void FlushOnGpuThread(int32 put_offset); | 205 void FlushOnGpuThread(int32 put_offset, uint32_t order_num); |
205 void ScheduleDelayedWorkOnGpuThread(); | 206 void ScheduleDelayedWorkOnGpuThread(); |
206 uint32 CreateStreamTextureOnGpuThread(uint32 client_texture_id); | 207 uint32 CreateStreamTextureOnGpuThread(uint32 client_texture_id); |
207 bool MakeCurrent(); | 208 bool MakeCurrent(); |
208 base::Closure WrapCallback(const base::Closure& callback); | 209 base::Closure WrapCallback(const base::Closure& callback); |
209 State GetStateFast(); | 210 State GetStateFast(); |
210 void QueueTask(const base::Closure& task) { service_->ScheduleTask(task); } | 211 void QueueTask(const base::Closure& task) { service_->ScheduleTask(task); } |
211 void CheckSequencedThread(); | 212 void CheckSequencedThread(); |
212 void RetireSyncPointOnGpuThread(uint32 sync_point); | 213 void RetireSyncPointOnGpuThread(uint32 sync_point); |
213 void SignalSyncPointOnGpuThread(uint32 sync_point, | 214 void SignalSyncPointOnGpuThread(uint32 sync_point, |
214 const base::Closure& callback); | 215 const base::Closure& callback); |
(...skipping 18 matching lines...) Expand all Loading... |
233 const uint64_t command_buffer_id_; | 234 const uint64_t command_buffer_id_; |
234 | 235 |
235 // Members accessed on the gpu thread (possibly with the exception of | 236 // Members accessed on the gpu thread (possibly with the exception of |
236 // creation): | 237 // creation): |
237 bool context_lost_; | 238 bool context_lost_; |
238 scoped_refptr<TransferBufferManagerInterface> transfer_buffer_manager_; | 239 scoped_refptr<TransferBufferManagerInterface> transfer_buffer_manager_; |
239 scoped_ptr<GpuScheduler> gpu_scheduler_; | 240 scoped_ptr<GpuScheduler> gpu_scheduler_; |
240 scoped_ptr<gles2::GLES2Decoder> decoder_; | 241 scoped_ptr<gles2::GLES2Decoder> decoder_; |
241 scoped_refptr<gfx::GLContext> context_; | 242 scoped_refptr<gfx::GLContext> context_; |
242 scoped_refptr<gfx::GLSurface> surface_; | 243 scoped_refptr<gfx::GLSurface> surface_; |
| 244 scoped_ptr<SyncPointClient> sync_point_client_; |
243 base::Closure context_lost_callback_; | 245 base::Closure context_lost_callback_; |
244 bool delayed_work_pending_; // Used to throttle PerformDelayedWork. | 246 bool delayed_work_pending_; // Used to throttle PerformDelayedWork. |
245 ImageFactory* image_factory_; | 247 ImageFactory* image_factory_; |
246 | 248 |
247 // Members accessed on the client thread: | 249 // Members accessed on the client thread: |
248 State last_state_; | 250 State last_state_; |
249 int32 last_put_offset_; | 251 int32 last_put_offset_; |
250 gpu::Capabilities capabilities_; | 252 gpu::Capabilities capabilities_; |
251 GpuMemoryBufferManager* gpu_memory_buffer_manager_; | 253 GpuMemoryBufferManager* gpu_memory_buffer_manager_; |
252 base::AtomicSequenceNumber next_image_id_; | 254 base::AtomicSequenceNumber next_image_id_; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 SyncPointManager* sync_point_manager_; // Non-owning. | 302 SyncPointManager* sync_point_manager_; // Non-owning. |
301 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_; | 303 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_; |
302 scoped_refptr<gpu::gles2::FramebufferCompletenessCache> | 304 scoped_refptr<gpu::gles2::FramebufferCompletenessCache> |
303 framebuffer_completeness_cache_; | 305 framebuffer_completeness_cache_; |
304 DISALLOW_COPY_AND_ASSIGN(GpuInProcessThread); | 306 DISALLOW_COPY_AND_ASSIGN(GpuInProcessThread); |
305 }; | 307 }; |
306 | 308 |
307 } // namespace gpu | 309 } // namespace gpu |
308 | 310 |
309 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ | 311 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ |
OLD | NEW |