OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ | 5 #ifndef CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ |
6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ | 6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 17 matching lines...) Expand all Loading... |
28 } | 28 } |
29 | 29 |
30 namespace gfx { | 30 namespace gfx { |
31 class GLShareGroup; | 31 class GLShareGroup; |
32 } | 32 } |
33 | 33 |
34 namespace gpu { | 34 namespace gpu { |
35 class SyncPointManager; | 35 class SyncPointManager; |
36 union ValueState; | 36 union ValueState; |
37 namespace gles2 { | 37 namespace gles2 { |
| 38 class FramebufferCompletenessCache; |
38 class MailboxManager; | 39 class MailboxManager; |
39 class ProgramCache; | 40 class ProgramCache; |
40 class ShaderTranslatorCache; | 41 class ShaderTranslatorCache; |
41 } | 42 } |
42 } | 43 } |
43 | 44 |
44 namespace IPC { | 45 namespace IPC { |
45 class AttachmentBroker; | 46 class AttachmentBroker; |
46 struct ChannelHandle; | 47 struct ChannelHandle; |
47 class SyncChannel; | 48 class SyncChannel; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 uint64 MessagesProcessed(); | 86 uint64 MessagesProcessed(); |
86 | 87 |
87 void LoseAllContexts(); | 88 void LoseAllContexts(); |
88 | 89 |
89 int GenerateRouteID(); | 90 int GenerateRouteID(); |
90 void AddRoute(int32 routing_id, IPC::Listener* listener); | 91 void AddRoute(int32 routing_id, IPC::Listener* listener); |
91 void RemoveRoute(int32 routing_id); | 92 void RemoveRoute(int32 routing_id); |
92 | 93 |
93 gpu::gles2::ProgramCache* program_cache(); | 94 gpu::gles2::ProgramCache* program_cache(); |
94 gpu::gles2::ShaderTranslatorCache* shader_translator_cache(); | 95 gpu::gles2::ShaderTranslatorCache* shader_translator_cache(); |
| 96 gpu::gles2::FramebufferCompletenessCache* framebuffer_completeness_cache(); |
95 | 97 |
96 GpuMemoryManager* gpu_memory_manager() { return &gpu_memory_manager_; } | 98 GpuMemoryManager* gpu_memory_manager() { return &gpu_memory_manager_; } |
97 | 99 |
98 GpuChannel* LookupChannel(int32 client_id); | 100 GpuChannel* LookupChannel(int32 client_id); |
99 | 101 |
100 gpu::SyncPointManager* sync_point_manager() { | 102 gpu::SyncPointManager* sync_point_manager() { |
101 return sync_point_manager_; | 103 return sync_point_manager_; |
102 } | 104 } |
103 | 105 |
104 gfx::GLSurface* GetDefaultOffscreenSurface(); | 106 gfx::GLSurface* GetDefaultOffscreenSurface(); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 // process. | 152 // process. |
151 GpuChannelMap gpu_channels_; | 153 GpuChannelMap gpu_channels_; |
152 scoped_refptr<gfx::GLShareGroup> share_group_; | 154 scoped_refptr<gfx::GLShareGroup> share_group_; |
153 scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_; | 155 scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_; |
154 GpuMemoryManager gpu_memory_manager_; | 156 GpuMemoryManager gpu_memory_manager_; |
155 GpuWatchdog* watchdog_; | 157 GpuWatchdog* watchdog_; |
156 // SyncPointManager guaranteed to outlive running MessageLoop. | 158 // SyncPointManager guaranteed to outlive running MessageLoop. |
157 gpu::SyncPointManager* sync_point_manager_; | 159 gpu::SyncPointManager* sync_point_manager_; |
158 scoped_ptr<gpu::gles2::ProgramCache> program_cache_; | 160 scoped_ptr<gpu::gles2::ProgramCache> program_cache_; |
159 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_; | 161 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_; |
| 162 scoped_refptr<gpu::gles2::FramebufferCompletenessCache> |
| 163 framebuffer_completeness_cache_; |
160 scoped_refptr<gfx::GLSurface> default_offscreen_surface_; | 164 scoped_refptr<gfx::GLSurface> default_offscreen_surface_; |
161 GpuMemoryBufferFactory* const gpu_memory_buffer_factory_; | 165 GpuMemoryBufferFactory* const gpu_memory_buffer_factory_; |
162 IPC::SyncChannel* channel_; | 166 IPC::SyncChannel* channel_; |
163 // Must outlive this instance of GpuChannelManager. | 167 // Must outlive this instance of GpuChannelManager. |
164 IPC::AttachmentBroker* attachment_broker_; | 168 IPC::AttachmentBroker* attachment_broker_; |
165 | 169 |
166 // Member variables should appear before the WeakPtrFactory, to ensure | 170 // Member variables should appear before the WeakPtrFactory, to ensure |
167 // that any WeakPtrs to Controller are invalidated before its members | 171 // that any WeakPtrs to Controller are invalidated before its members |
168 // variable's destructors are executed, rendering them invalid. | 172 // variable's destructors are executed, rendering them invalid. |
169 base::WeakPtrFactory<GpuChannelManager> weak_factory_; | 173 base::WeakPtrFactory<GpuChannelManager> weak_factory_; |
170 | 174 |
171 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); | 175 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); |
172 }; | 176 }; |
173 | 177 |
174 } // namespace content | 178 } // namespace content |
175 | 179 |
176 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ | 180 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ |
OLD | NEW |