Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Side by Side Diff: gpu/ipc/service/gpu_channel_manager.h

Issue 2814583002: Service/ClientDiscardableManager (Closed)
Patch Set: Feedback Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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>
11 #include <memory> 11 #include <memory>
12 #include <string> 12 #include <string>
13 #include <unordered_map> 13 #include <unordered_map>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/macros.h" 16 #include "base/macros.h"
17 #include "base/memory/ref_counted.h" 17 #include "base/memory/ref_counted.h"
18 #include "base/memory/weak_ptr.h" 18 #include "base/memory/weak_ptr.h"
19 #include "build/build_config.h" 19 #include "build/build_config.h"
20 #include "gpu/command_buffer/common/activity_flags.h" 20 #include "gpu/command_buffer/common/activity_flags.h"
21 #include "gpu/command_buffer/common/constants.h" 21 #include "gpu/command_buffer/common/constants.h"
22 #include "gpu/command_buffer/service/gpu_preferences.h" 22 #include "gpu/command_buffer/service/gpu_preferences.h"
23 #include "gpu/command_buffer/service/service_discardable_manager.h"
23 #include "gpu/config/gpu_driver_bug_workarounds.h" 24 #include "gpu/config/gpu_driver_bug_workarounds.h"
24 #include "gpu/config/gpu_feature_info.h" 25 #include "gpu/config/gpu_feature_info.h"
25 #include "gpu/gpu_export.h" 26 #include "gpu/gpu_export.h"
26 #include "gpu/ipc/service/gpu_memory_manager.h" 27 #include "gpu/ipc/service/gpu_memory_manager.h"
27 #include "ui/gfx/gpu_memory_buffer.h" 28 #include "ui/gfx/gpu_memory_buffer.h"
28 #include "ui/gfx/native_widget_types.h" 29 #include "ui/gfx/native_widget_types.h"
29 #include "ui/gl/gl_surface.h" 30 #include "ui/gl/gl_surface.h"
30 #include "url/gurl.h" 31 #include "url/gurl.h"
31 32
32 namespace gl { 33 namespace gl {
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 GpuMemoryManager gpu_memory_manager_; 153 GpuMemoryManager gpu_memory_manager_;
153 // SyncPointManager guaranteed to outlive running MessageLoop. 154 // SyncPointManager guaranteed to outlive running MessageLoop.
154 SyncPointManager* sync_point_manager_; 155 SyncPointManager* sync_point_manager_;
155 std::unique_ptr<gles2::ProgramCache> program_cache_; 156 std::unique_ptr<gles2::ProgramCache> program_cache_;
156 scoped_refptr<gles2::ShaderTranslatorCache> shader_translator_cache_; 157 scoped_refptr<gles2::ShaderTranslatorCache> shader_translator_cache_;
157 scoped_refptr<gles2::FramebufferCompletenessCache> 158 scoped_refptr<gles2::FramebufferCompletenessCache>
158 framebuffer_completeness_cache_; 159 framebuffer_completeness_cache_;
159 scoped_refptr<gl::GLSurface> default_offscreen_surface_; 160 scoped_refptr<gl::GLSurface> default_offscreen_surface_;
160 GpuMemoryBufferFactory* const gpu_memory_buffer_factory_; 161 GpuMemoryBufferFactory* const gpu_memory_buffer_factory_;
161 GpuFeatureInfo gpu_feature_info_; 162 GpuFeatureInfo gpu_feature_info_;
163 ServiceDiscardableManager discardable_manager_;
162 #if defined(OS_ANDROID) 164 #if defined(OS_ANDROID)
163 // Last time we know the GPU was powered on. Global for tracking across all 165 // Last time we know the GPU was powered on. Global for tracking across all
164 // transport surfaces. 166 // transport surfaces.
165 base::TimeTicks last_gpu_access_time_; 167 base::TimeTicks last_gpu_access_time_;
166 base::TimeTicks begin_wake_up_time_; 168 base::TimeTicks begin_wake_up_time_;
167 #endif 169 #endif
168 170
169 // Set during intentional GPU process shutdown. 171 // Set during intentional GPU process shutdown.
170 bool exiting_for_lost_context_; 172 bool exiting_for_lost_context_;
171 173
172 // Flags which indicate GPU process activity. Read by the browser process 174 // Flags which indicate GPU process activity. Read by the browser process
173 // on GPU process crash. 175 // on GPU process crash.
174 GpuProcessActivityFlags activity_flags_; 176 GpuProcessActivityFlags activity_flags_;
175 177
176 // Member variables should appear before the WeakPtrFactory, to ensure 178 // Member variables should appear before the WeakPtrFactory, to ensure
177 // that any WeakPtrs to Controller are invalidated before its members 179 // that any WeakPtrs to Controller are invalidated before its members
178 // variable's destructors are executed, rendering them invalid. 180 // variable's destructors are executed, rendering them invalid.
179 base::WeakPtrFactory<GpuChannelManager> weak_factory_; 181 base::WeakPtrFactory<GpuChannelManager> weak_factory_;
180 182
181 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); 183 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager);
182 }; 184 };
183 185
184 } // namespace gpu 186 } // namespace gpu
185 187
186 #endif // GPU_IPC_SERVICE_GPU_CHANNEL_MANAGER_H_ 188 #endif // GPU_IPC_SERVICE_GPU_CHANNEL_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698