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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 virtual scoped_refptr<gles2::ShaderTranslatorCache> | 195 virtual scoped_refptr<gles2::ShaderTranslatorCache> |
195 shader_translator_cache() = 0; | 196 shader_translator_cache() = 0; |
196 virtual scoped_refptr<gles2::FramebufferCompletenessCache> | 197 virtual scoped_refptr<gles2::FramebufferCompletenessCache> |
197 framebuffer_completeness_cache() = 0; | 198 framebuffer_completeness_cache() = 0; |
198 virtual SyncPointManager* sync_point_manager() = 0; | 199 virtual SyncPointManager* sync_point_manager() = 0; |
199 const GpuPreferences& gpu_preferences(); | 200 const GpuPreferences& gpu_preferences(); |
200 const GpuDriverBugWorkarounds& gpu_driver_bug_workarounds(); | 201 const GpuDriverBugWorkarounds& gpu_driver_bug_workarounds(); |
201 scoped_refptr<gl::GLShareGroup> share_group(); | 202 scoped_refptr<gl::GLShareGroup> share_group(); |
202 scoped_refptr<gles2::MailboxManager> mailbox_manager(); | 203 scoped_refptr<gles2::MailboxManager> mailbox_manager(); |
203 gpu::gles2::ProgramCache* program_cache(); | 204 gpu::gles2::ProgramCache* program_cache(); |
| 205 ServiceDiscardableManager* discardable_manager(); |
204 virtual bool BlockThreadOnWaitSyncToken() const = 0; | 206 virtual bool BlockThreadOnWaitSyncToken() const = 0; |
205 | 207 |
206 protected: | 208 protected: |
207 const GpuPreferences gpu_preferences_; | 209 const GpuPreferences gpu_preferences_; |
208 const GpuDriverBugWorkarounds gpu_driver_bug_workarounds_; | 210 const GpuDriverBugWorkarounds gpu_driver_bug_workarounds_; |
209 scoped_refptr<gles2::MailboxManager> mailbox_manager_; | 211 scoped_refptr<gles2::MailboxManager> mailbox_manager_; |
210 scoped_refptr<gl::GLShareGroup> share_group_; | 212 scoped_refptr<gl::GLShareGroup> share_group_; |
211 std::unique_ptr<gpu::gles2::ProgramCache> program_cache_; | 213 std::unique_ptr<gpu::gles2::ProgramCache> program_cache_; |
212 // No-op default initialization is used in in-process mode. | 214 // No-op default initialization is used in in-process mode. |
213 GpuProcessActivityFlags activity_flags_; | 215 GpuProcessActivityFlags activity_flags_; |
| 216 std::unique_ptr<ServiceDiscardableManager> discardable_manager_; |
214 }; | 217 }; |
215 | 218 |
216 private: | 219 private: |
217 struct InitializeOnGpuThreadParams { | 220 struct InitializeOnGpuThreadParams { |
218 bool is_offscreen; | 221 bool is_offscreen; |
219 SurfaceHandle window; | 222 SurfaceHandle window; |
220 const gles2::ContextCreationAttribHelper& attribs; | 223 const gles2::ContextCreationAttribHelper& attribs; |
221 gpu::Capabilities* capabilities; // Ouptut. | 224 gpu::Capabilities* capabilities; // Ouptut. |
222 InProcessCommandBuffer* context_group; | 225 InProcessCommandBuffer* context_group; |
223 ImageFactory* image_factory; | 226 ImageFactory* image_factory; |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 base::WeakPtr<InProcessCommandBuffer> gpu_thread_weak_ptr_; | 348 base::WeakPtr<InProcessCommandBuffer> gpu_thread_weak_ptr_; |
346 base::WeakPtrFactory<InProcessCommandBuffer> client_thread_weak_ptr_factory_; | 349 base::WeakPtrFactory<InProcessCommandBuffer> client_thread_weak_ptr_factory_; |
347 base::WeakPtrFactory<InProcessCommandBuffer> gpu_thread_weak_ptr_factory_; | 350 base::WeakPtrFactory<InProcessCommandBuffer> gpu_thread_weak_ptr_factory_; |
348 | 351 |
349 DISALLOW_COPY_AND_ASSIGN(InProcessCommandBuffer); | 352 DISALLOW_COPY_AND_ASSIGN(InProcessCommandBuffer); |
350 }; | 353 }; |
351 | 354 |
352 } // namespace gpu | 355 } // namespace gpu |
353 | 356 |
354 #endif // GPU_IPC_IN_PROCESS_COMMAND_BUFFER_H_ | 357 #endif // GPU_IPC_IN_PROCESS_COMMAND_BUFFER_H_ |
OLD | NEW |