| 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 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 // example GPU thread) when being run in single process mode. | 76 // example GPU thread) when being run in single process mode. |
| 77 // However, the behavior for accessing one context (i.e. one instance of this | 77 // However, the behavior for accessing one context (i.e. one instance of this |
| 78 // class) from different client threads is undefined. | 78 // class) from different client threads is undefined. |
| 79 class GPU_EXPORT InProcessCommandBuffer : public CommandBuffer, | 79 class GPU_EXPORT InProcessCommandBuffer : public CommandBuffer, |
| 80 public GpuControl { | 80 public GpuControl { |
| 81 public: | 81 public: |
| 82 class Service; | 82 class Service; |
| 83 explicit InProcessCommandBuffer(const scoped_refptr<Service>& service); | 83 explicit InProcessCommandBuffer(const scoped_refptr<Service>& service); |
| 84 ~InProcessCommandBuffer() override; | 84 ~InProcessCommandBuffer() override; |
| 85 | 85 |
| 86 // If |surface| is not NULL, use it directly; in this case, the command | 86 // If |surface| is not null, use it directly; in this case, the command |
| 87 // buffer gpu thread must be the same as the client thread. Otherwise create | 87 // buffer gpu thread must be the same as the client thread. Otherwise create |
| 88 // a new GLSurface. | 88 // a new GLSurface. |
| 89 bool Initialize(scoped_refptr<gfx::GLSurface> surface, | 89 bool Initialize(scoped_refptr<gfx::GLSurface> surface, |
| 90 bool is_offscreen, | 90 bool is_offscreen, |
| 91 gfx::AcceleratedWidget window, | 91 gfx::AcceleratedWidget window, |
| 92 const gfx::Size& size, | 92 const gfx::Size& size, |
| 93 const std::vector<int32_t>& attribs, | 93 const std::vector<int32_t>& attribs, |
| 94 gfx::GpuPreference gpu_preference, | 94 gfx::GpuPreference gpu_preference, |
| 95 const base::Closure& context_lost_callback, | 95 const base::Closure& context_lost_callback, |
| 96 InProcessCommandBuffer* share_group, | 96 InProcessCommandBuffer* share_group, |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 SyncPointManager* sync_point_manager_; // Non-owning. | 320 SyncPointManager* sync_point_manager_; // Non-owning. |
| 321 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_; | 321 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_; |
| 322 scoped_refptr<gpu::gles2::FramebufferCompletenessCache> | 322 scoped_refptr<gpu::gles2::FramebufferCompletenessCache> |
| 323 framebuffer_completeness_cache_; | 323 framebuffer_completeness_cache_; |
| 324 DISALLOW_COPY_AND_ASSIGN(GpuInProcessThread); | 324 DISALLOW_COPY_AND_ASSIGN(GpuInProcessThread); |
| 325 }; | 325 }; |
| 326 | 326 |
| 327 } // namespace gpu | 327 } // namespace gpu |
| 328 | 328 |
| 329 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ | 329 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ |
| OLD | NEW |