| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 size(size), | 193 size(size), |
| 193 attribs(attribs), | 194 attribs(attribs), |
| 194 gpu_preference(gpu_preference), | 195 gpu_preference(gpu_preference), |
| 195 capabilities(capabilities), | 196 capabilities(capabilities), |
| 196 context_group(share_group), | 197 context_group(share_group), |
| 197 image_factory(image_factory) {} | 198 image_factory(image_factory) {} |
| 198 }; | 199 }; |
| 199 | 200 |
| 200 bool InitializeOnGpuThread(const InitializeOnGpuThreadParams& params); | 201 bool InitializeOnGpuThread(const InitializeOnGpuThreadParams& params); |
| 201 bool DestroyOnGpuThread(); | 202 bool DestroyOnGpuThread(); |
| 202 void FlushOnGpuThread(int32 put_offset); | 203 void FlushOnGpuThread(int32 put_offset, uint32_t order_num); |
| 203 void ScheduleIdleWorkOnGpuThread(); | 204 void ScheduleIdleWorkOnGpuThread(); |
| 204 uint32 CreateStreamTextureOnGpuThread(uint32 client_texture_id); | 205 uint32 CreateStreamTextureOnGpuThread(uint32 client_texture_id); |
| 205 bool MakeCurrent(); | 206 bool MakeCurrent(); |
| 206 base::Closure WrapCallback(const base::Closure& callback); | 207 base::Closure WrapCallback(const base::Closure& callback); |
| 207 State GetStateFast(); | 208 State GetStateFast(); |
| 208 void QueueTask(const base::Closure& task) { service_->ScheduleTask(task); } | 209 void QueueTask(const base::Closure& task) { service_->ScheduleTask(task); } |
| 209 void CheckSequencedThread(); | 210 void CheckSequencedThread(); |
| 210 void RetireSyncPointOnGpuThread(uint32 sync_point); | 211 void RetireSyncPointOnGpuThread(uint32 sync_point); |
| 211 void SignalSyncPointOnGpuThread(uint32 sync_point, | 212 void SignalSyncPointOnGpuThread(uint32 sync_point, |
| 212 const base::Closure& callback); | 213 const base::Closure& callback); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 229 void PerformIdleWork(); | 230 void PerformIdleWork(); |
| 230 | 231 |
| 231 // Members accessed on the gpu thread (possibly with the exception of | 232 // Members accessed on the gpu thread (possibly with the exception of |
| 232 // creation): | 233 // creation): |
| 233 bool context_lost_; | 234 bool context_lost_; |
| 234 scoped_refptr<TransferBufferManagerInterface> transfer_buffer_manager_; | 235 scoped_refptr<TransferBufferManagerInterface> transfer_buffer_manager_; |
| 235 scoped_ptr<GpuScheduler> gpu_scheduler_; | 236 scoped_ptr<GpuScheduler> gpu_scheduler_; |
| 236 scoped_ptr<gles2::GLES2Decoder> decoder_; | 237 scoped_ptr<gles2::GLES2Decoder> decoder_; |
| 237 scoped_refptr<gfx::GLContext> context_; | 238 scoped_refptr<gfx::GLContext> context_; |
| 238 scoped_refptr<gfx::GLSurface> surface_; | 239 scoped_refptr<gfx::GLSurface> surface_; |
| 240 scoped_refptr<SyncPointClient> sync_point_client_; |
| 239 base::Closure context_lost_callback_; | 241 base::Closure context_lost_callback_; |
| 240 bool idle_work_pending_; // Used to throttle PerformIdleWork. | 242 bool idle_work_pending_; // Used to throttle PerformIdleWork. |
| 241 ImageFactory* image_factory_; | 243 ImageFactory* image_factory_; |
| 242 | 244 |
| 243 // Members accessed on the client thread: | 245 // Members accessed on the client thread: |
| 244 State last_state_; | 246 State last_state_; |
| 245 int32 last_put_offset_; | 247 int32 last_put_offset_; |
| 246 gpu::Capabilities capabilities_; | 248 gpu::Capabilities capabilities_; |
| 247 GpuMemoryBufferManager* gpu_memory_buffer_manager_; | 249 GpuMemoryBufferManager* gpu_memory_buffer_manager_; |
| 248 base::AtomicSequenceNumber next_image_id_; | 250 base::AtomicSequenceNumber next_image_id_; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 SyncPointManager* sync_point_manager_; // Non-owning. | 298 SyncPointManager* sync_point_manager_; // Non-owning. |
| 297 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_; | 299 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_; |
| 298 scoped_refptr<gpu::gles2::FramebufferCompletenessCache> | 300 scoped_refptr<gpu::gles2::FramebufferCompletenessCache> |
| 299 framebuffer_completeness_cache_; | 301 framebuffer_completeness_cache_; |
| 300 DISALLOW_COPY_AND_ASSIGN(GpuInProcessThread); | 302 DISALLOW_COPY_AND_ASSIGN(GpuInProcessThread); |
| 301 }; | 303 }; |
| 302 | 304 |
| 303 } // namespace gpu | 305 } // namespace gpu |
| 304 | 306 |
| 305 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ | 307 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ |
| OLD | NEW |