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_IPC_IN_PROCESS_COMMAND_BUFFER_H_ | 5 #ifndef GPU_IPC_IN_PROCESS_COMMAND_BUFFER_H_ |
6 #define GPU_IPC_IN_PROCESS_COMMAND_BUFFER_H_ | 6 #define GPU_IPC_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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 class GLShareGroup; | 45 class GLShareGroup; |
46 class GLSurface; | 46 class GLSurface; |
47 } | 47 } |
48 | 48 |
49 namespace gfx { | 49 namespace gfx { |
50 class Size; | 50 class Size; |
51 } | 51 } |
52 | 52 |
53 namespace gpu { | 53 namespace gpu { |
54 | 54 |
| 55 class ServiceDiscardableManager; |
55 class SyncPointClientState; | 56 class SyncPointClientState; |
56 class SyncPointOrderData; | 57 class SyncPointOrderData; |
57 class SyncPointManager; | 58 class SyncPointManager; |
58 struct GpuProcessHostedCALayerTreeParamsMac; | 59 struct GpuProcessHostedCALayerTreeParamsMac; |
59 | 60 |
60 namespace gles2 { | 61 namespace gles2 { |
61 struct ContextCreationAttribHelper; | 62 struct ContextCreationAttribHelper; |
62 class FramebufferCompletenessCache; | 63 class FramebufferCompletenessCache; |
63 class GLES2Decoder; | 64 class GLES2Decoder; |
64 class MailboxManager; | 65 class MailboxManager; |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 virtual scoped_refptr<gles2::ShaderTranslatorCache> | 192 virtual scoped_refptr<gles2::ShaderTranslatorCache> |
192 shader_translator_cache() = 0; | 193 shader_translator_cache() = 0; |
193 virtual scoped_refptr<gles2::FramebufferCompletenessCache> | 194 virtual scoped_refptr<gles2::FramebufferCompletenessCache> |
194 framebuffer_completeness_cache() = 0; | 195 framebuffer_completeness_cache() = 0; |
195 virtual SyncPointManager* sync_point_manager() = 0; | 196 virtual SyncPointManager* sync_point_manager() = 0; |
196 const GpuPreferences& gpu_preferences(); | 197 const GpuPreferences& gpu_preferences(); |
197 const GpuDriverBugWorkarounds& gpu_driver_bug_workarounds(); | 198 const GpuDriverBugWorkarounds& gpu_driver_bug_workarounds(); |
198 scoped_refptr<gl::GLShareGroup> share_group(); | 199 scoped_refptr<gl::GLShareGroup> share_group(); |
199 scoped_refptr<gles2::MailboxManager> mailbox_manager(); | 200 scoped_refptr<gles2::MailboxManager> mailbox_manager(); |
200 gpu::gles2::ProgramCache* program_cache(); | 201 gpu::gles2::ProgramCache* program_cache(); |
| 202 ServiceDiscardableManager* discardable_manager(); |
201 virtual bool BlockThreadOnWaitSyncToken() const = 0; | 203 virtual bool BlockThreadOnWaitSyncToken() const = 0; |
202 | 204 |
203 protected: | 205 protected: |
204 const GpuPreferences gpu_preferences_; | 206 const GpuPreferences gpu_preferences_; |
205 const GpuDriverBugWorkarounds gpu_driver_bug_workarounds_; | 207 const GpuDriverBugWorkarounds gpu_driver_bug_workarounds_; |
206 scoped_refptr<gles2::MailboxManager> mailbox_manager_; | 208 scoped_refptr<gles2::MailboxManager> mailbox_manager_; |
207 scoped_refptr<gl::GLShareGroup> share_group_; | 209 scoped_refptr<gl::GLShareGroup> share_group_; |
208 std::unique_ptr<gpu::gles2::ProgramCache> program_cache_; | 210 std::unique_ptr<gpu::gles2::ProgramCache> program_cache_; |
209 // No-op default initialization is used in in-process mode. | 211 // No-op default initialization is used in in-process mode. |
210 GpuProcessActivityFlags activity_flags_; | 212 GpuProcessActivityFlags activity_flags_; |
| 213 std::unique_ptr<ServiceDiscardableManager> discardable_manager_; |
211 }; | 214 }; |
212 | 215 |
213 private: | 216 private: |
214 struct InitializeOnGpuThreadParams { | 217 struct InitializeOnGpuThreadParams { |
215 bool is_offscreen; | 218 bool is_offscreen; |
216 SurfaceHandle window; | 219 SurfaceHandle window; |
217 const gles2::ContextCreationAttribHelper& attribs; | 220 const gles2::ContextCreationAttribHelper& attribs; |
218 gpu::Capabilities* capabilities; // Ouptut. | 221 gpu::Capabilities* capabilities; // Ouptut. |
219 InProcessCommandBuffer* context_group; | 222 InProcessCommandBuffer* context_group; |
220 ImageFactory* image_factory; | 223 ImageFactory* image_factory; |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 base::WeakPtr<InProcessCommandBuffer> gpu_thread_weak_ptr_; | 345 base::WeakPtr<InProcessCommandBuffer> gpu_thread_weak_ptr_; |
343 base::WeakPtrFactory<InProcessCommandBuffer> client_thread_weak_ptr_factory_; | 346 base::WeakPtrFactory<InProcessCommandBuffer> client_thread_weak_ptr_factory_; |
344 base::WeakPtrFactory<InProcessCommandBuffer> gpu_thread_weak_ptr_factory_; | 347 base::WeakPtrFactory<InProcessCommandBuffer> gpu_thread_weak_ptr_factory_; |
345 | 348 |
346 DISALLOW_COPY_AND_ASSIGN(InProcessCommandBuffer); | 349 DISALLOW_COPY_AND_ASSIGN(InProcessCommandBuffer); |
347 }; | 350 }; |
348 | 351 |
349 } // namespace gpu | 352 } // namespace gpu |
350 | 353 |
351 #endif // GPU_IPC_IN_PROCESS_COMMAND_BUFFER_H_ | 354 #endif // GPU_IPC_IN_PROCESS_COMMAND_BUFFER_H_ |
OLD | NEW |