| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include <map> | 11 #include <map> |
| 12 #include <memory> | 12 #include <memory> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/atomic_sequence_num.h" | 15 #include "base/atomic_sequence_num.h" |
| 16 #include "base/callback.h" | 16 #include "base/callback.h" |
| 17 #include "base/compiler_specific.h" | 17 #include "base/compiler_specific.h" |
| 18 #include "base/containers/scoped_ptr_hash_map.h" | 18 #include "base/containers/scoped_ptr_hash_map.h" |
| 19 #include "base/macros.h" | 19 #include "base/macros.h" |
| 20 #include "base/memory/ref_counted.h" | 20 #include "base/memory/ref_counted.h" |
| 21 #include "base/memory/weak_ptr.h" | 21 #include "base/memory/weak_ptr.h" |
| 22 #include "base/single_thread_task_runner.h" | 22 #include "base/single_thread_task_runner.h" |
| 23 #include "base/synchronization/lock.h" | 23 #include "base/synchronization/lock.h" |
| 24 #include "base/synchronization/waitable_event.h" | 24 #include "base/synchronization/waitable_event.h" |
| 25 #include "base/threading/thread.h" | 25 #include "base/threading/thread.h" |
| 26 #include "gpu/command_buffer/client/gpu_control.h" | 26 #include "gpu/command_buffer/client/gpu_control.h" |
| 27 #include "gpu/command_buffer/common/command_buffer.h" | 27 #include "gpu/command_buffer/common/command_buffer.h" |
| 28 #include "gpu/command_buffer/service/gpu_preferences.h" | 28 #include "gpu/command_buffer/service/gpu_preferences.h" |
| 29 #include "gpu/command_buffer/service/progress_reporter_stub.h" |
| 29 #include "gpu/config/gpu_driver_bug_workarounds.h" | 30 #include "gpu/config/gpu_driver_bug_workarounds.h" |
| 30 #include "gpu/gpu_export.h" | 31 #include "gpu/gpu_export.h" |
| 31 #include "ui/gfx/gpu_memory_buffer.h" | 32 #include "ui/gfx/gpu_memory_buffer.h" |
| 32 #include "ui/gfx/native_widget_types.h" | 33 #include "ui/gfx/native_widget_types.h" |
| 33 #include "ui/gl/gl_surface.h" | 34 #include "ui/gl/gl_surface.h" |
| 34 #include "ui/gl/gpu_preference.h" | 35 #include "ui/gl/gpu_preference.h" |
| 35 | 36 |
| 36 namespace base { | 37 namespace base { |
| 37 class SequenceChecker; | 38 class SequenceChecker; |
| 38 } | 39 } |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 std::unique_ptr<CommandExecutor> executor_; | 238 std::unique_ptr<CommandExecutor> executor_; |
| 238 std::unique_ptr<gles2::GLES2Decoder> decoder_; | 239 std::unique_ptr<gles2::GLES2Decoder> decoder_; |
| 239 scoped_refptr<gl::GLContext> context_; | 240 scoped_refptr<gl::GLContext> context_; |
| 240 scoped_refptr<gl::GLSurface> surface_; | 241 scoped_refptr<gl::GLSurface> surface_; |
| 241 scoped_refptr<SyncPointOrderData> sync_point_order_data_; | 242 scoped_refptr<SyncPointOrderData> sync_point_order_data_; |
| 242 std::unique_ptr<SyncPointClient> sync_point_client_; | 243 std::unique_ptr<SyncPointClient> sync_point_client_; |
| 243 base::Closure context_lost_callback_; | 244 base::Closure context_lost_callback_; |
| 244 // Used to throttle PerformDelayedWorkOnGpuThread. | 245 // Used to throttle PerformDelayedWorkOnGpuThread. |
| 245 bool delayed_work_pending_; | 246 bool delayed_work_pending_; |
| 246 ImageFactory* image_factory_; | 247 ImageFactory* image_factory_; |
| 248 // There is no watchdog thread in in-process mode, so use the stub |
| 249 // ProgressReporter. |
| 250 gles2::ProgressReporterStub progress_reporter_; |
| 247 | 251 |
| 248 // Members accessed on the client thread: | 252 // Members accessed on the client thread: |
| 249 GpuControlClient* gpu_control_client_; | 253 GpuControlClient* gpu_control_client_; |
| 250 #if DCHECK_IS_ON() | 254 #if DCHECK_IS_ON() |
| 251 bool context_lost_; | 255 bool context_lost_; |
| 252 #endif | 256 #endif |
| 253 State last_state_; | 257 State last_state_; |
| 254 int32_t last_put_offset_; | 258 int32_t last_put_offset_; |
| 255 gpu::Capabilities capabilities_; | 259 gpu::Capabilities capabilities_; |
| 256 GpuMemoryBufferManager* gpu_memory_buffer_manager_; | 260 GpuMemoryBufferManager* gpu_memory_buffer_manager_; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 SyncPointManager* sync_point_manager_; // Non-owning. | 310 SyncPointManager* sync_point_manager_; // Non-owning. |
| 307 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_; | 311 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_; |
| 308 scoped_refptr<gpu::gles2::FramebufferCompletenessCache> | 312 scoped_refptr<gpu::gles2::FramebufferCompletenessCache> |
| 309 framebuffer_completeness_cache_; | 313 framebuffer_completeness_cache_; |
| 310 DISALLOW_COPY_AND_ASSIGN(GpuInProcessThread); | 314 DISALLOW_COPY_AND_ASSIGN(GpuInProcessThread); |
| 311 }; | 315 }; |
| 312 | 316 |
| 313 } // namespace gpu | 317 } // namespace gpu |
| 314 | 318 |
| 315 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ | 319 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ |
| OLD | NEW |