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 GPU_IPC_SERVICE_GPU_CHANNEL_MANAGER_H_ | 5 #ifndef GPU_IPC_SERVICE_GPU_CHANNEL_MANAGER_H_ |
6 #define GPU_IPC_SERVICE_GPU_CHANNEL_MANAGER_H_ | 6 #define GPU_IPC_SERVICE_GPU_CHANNEL_MANAGER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <deque> | 10 #include <deque> |
(...skipping 21 matching lines...) Expand all Loading... |
32 class WaitableEvent; | 32 class WaitableEvent; |
33 } | 33 } |
34 | 34 |
35 namespace gl { | 35 namespace gl { |
36 class GLShareGroup; | 36 class GLShareGroup; |
37 } | 37 } |
38 | 38 |
39 namespace gpu { | 39 namespace gpu { |
40 struct GpuPreferences; | 40 struct GpuPreferences; |
41 class PreemptionFlag; | 41 class PreemptionFlag; |
42 class SyncPointClient; | |
43 class SyncPointManager; | 42 class SyncPointManager; |
44 struct SyncToken; | 43 struct SyncToken; |
45 namespace gles2 { | 44 namespace gles2 { |
46 class FramebufferCompletenessCache; | 45 class FramebufferCompletenessCache; |
47 class MailboxManager; | 46 class MailboxManager; |
48 class ProgramCache; | 47 class ProgramCache; |
49 class ShaderTranslatorCache; | 48 class ShaderTranslatorCache; |
50 } | 49 } |
51 } | 50 } |
52 | 51 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 GpuWatchdogThread* watchdog_; | 180 GpuWatchdogThread* watchdog_; |
182 | 181 |
183 base::WaitableEvent* shutdown_event_; | 182 base::WaitableEvent* shutdown_event_; |
184 | 183 |
185 scoped_refptr<gl::GLShareGroup> share_group_; | 184 scoped_refptr<gl::GLShareGroup> share_group_; |
186 scoped_refptr<gles2::MailboxManager> mailbox_manager_; | 185 scoped_refptr<gles2::MailboxManager> mailbox_manager_; |
187 scoped_refptr<PreemptionFlag> preemption_flag_; | 186 scoped_refptr<PreemptionFlag> preemption_flag_; |
188 GpuMemoryManager gpu_memory_manager_; | 187 GpuMemoryManager gpu_memory_manager_; |
189 // SyncPointManager guaranteed to outlive running MessageLoop. | 188 // SyncPointManager guaranteed to outlive running MessageLoop. |
190 SyncPointManager* sync_point_manager_; | 189 SyncPointManager* sync_point_manager_; |
191 std::unique_ptr<SyncPointClient> sync_point_client_waiter_; | |
192 std::unique_ptr<gles2::ProgramCache> program_cache_; | 190 std::unique_ptr<gles2::ProgramCache> program_cache_; |
193 scoped_refptr<gles2::ShaderTranslatorCache> shader_translator_cache_; | 191 scoped_refptr<gles2::ShaderTranslatorCache> shader_translator_cache_; |
194 scoped_refptr<gles2::FramebufferCompletenessCache> | 192 scoped_refptr<gles2::FramebufferCompletenessCache> |
195 framebuffer_completeness_cache_; | 193 framebuffer_completeness_cache_; |
196 scoped_refptr<gl::GLSurface> default_offscreen_surface_; | 194 scoped_refptr<gl::GLSurface> default_offscreen_surface_; |
197 GpuMemoryBufferFactory* const gpu_memory_buffer_factory_; | 195 GpuMemoryBufferFactory* const gpu_memory_buffer_factory_; |
198 GpuFeatureInfo gpu_feature_info_; | 196 GpuFeatureInfo gpu_feature_info_; |
199 #if defined(OS_ANDROID) | 197 #if defined(OS_ANDROID) |
200 // Last time we know the GPU was powered on. Global for tracking across all | 198 // Last time we know the GPU was powered on. Global for tracking across all |
201 // transport surfaces. | 199 // transport surfaces. |
202 base::TimeTicks last_gpu_access_time_; | 200 base::TimeTicks last_gpu_access_time_; |
203 base::TimeTicks begin_wake_up_time_; | 201 base::TimeTicks begin_wake_up_time_; |
204 #endif | 202 #endif |
205 | 203 |
206 // Set during intentional GPU process shutdown. | 204 // Set during intentional GPU process shutdown. |
207 bool exiting_for_lost_context_; | 205 bool exiting_for_lost_context_; |
208 | 206 |
209 // Member variables should appear before the WeakPtrFactory, to ensure | 207 // Member variables should appear before the WeakPtrFactory, to ensure |
210 // that any WeakPtrs to Controller are invalidated before its members | 208 // that any WeakPtrs to Controller are invalidated before its members |
211 // variable's destructors are executed, rendering them invalid. | 209 // variable's destructors are executed, rendering them invalid. |
212 base::WeakPtrFactory<GpuChannelManager> weak_factory_; | 210 base::WeakPtrFactory<GpuChannelManager> weak_factory_; |
213 | 211 |
214 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); | 212 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); |
215 }; | 213 }; |
216 | 214 |
217 } // namespace gpu | 215 } // namespace gpu |
218 | 216 |
219 #endif // GPU_IPC_SERVICE_GPU_CHANNEL_MANAGER_H_ | 217 #endif // GPU_IPC_SERVICE_GPU_CHANNEL_MANAGER_H_ |
OLD | NEW |