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

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

Issue 2818993002: GL Implementation for GPU Discardable
Patch Set: rebase Created 3 years, 8 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
« no previous file with comments | « gpu/ipc/service/gpu_channel.cc ('k') | gpu/ipc/service/gpu_channel_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 GpuMemoryManager gpu_memory_manager_; 151 GpuMemoryManager gpu_memory_manager_;
151 // SyncPointManager guaranteed to outlive running MessageLoop. 152 // SyncPointManager guaranteed to outlive running MessageLoop.
152 SyncPointManager* sync_point_manager_; 153 SyncPointManager* sync_point_manager_;
153 std::unique_ptr<gles2::ProgramCache> program_cache_; 154 std::unique_ptr<gles2::ProgramCache> program_cache_;
154 scoped_refptr<gles2::ShaderTranslatorCache> shader_translator_cache_; 155 scoped_refptr<gles2::ShaderTranslatorCache> shader_translator_cache_;
155 scoped_refptr<gles2::FramebufferCompletenessCache> 156 scoped_refptr<gles2::FramebufferCompletenessCache>
156 framebuffer_completeness_cache_; 157 framebuffer_completeness_cache_;
157 scoped_refptr<gl::GLSurface> default_offscreen_surface_; 158 scoped_refptr<gl::GLSurface> default_offscreen_surface_;
158 GpuMemoryBufferFactory* const gpu_memory_buffer_factory_; 159 GpuMemoryBufferFactory* const gpu_memory_buffer_factory_;
159 GpuFeatureInfo gpu_feature_info_; 160 GpuFeatureInfo gpu_feature_info_;
161 scoped_refptr<ServiceDiscardableManager> discardable_manager_;
160 #if defined(OS_ANDROID) 162 #if defined(OS_ANDROID)
161 // Last time we know the GPU was powered on. Global for tracking across all 163 // Last time we know the GPU was powered on. Global for tracking across all
162 // transport surfaces. 164 // transport surfaces.
163 base::TimeTicks last_gpu_access_time_; 165 base::TimeTicks last_gpu_access_time_;
164 base::TimeTicks begin_wake_up_time_; 166 base::TimeTicks begin_wake_up_time_;
165 #endif 167 #endif
166 168
167 // Set during intentional GPU process shutdown. 169 // Set during intentional GPU process shutdown.
168 bool exiting_for_lost_context_; 170 bool exiting_for_lost_context_;
169 171
170 // Flags which indicate GPU process activity. Read by the browser process 172 // Flags which indicate GPU process activity. Read by the browser process
171 // on GPU process crash. 173 // on GPU process crash.
172 GpuProcessActivityFlags activity_flags_; 174 GpuProcessActivityFlags activity_flags_;
173 175
174 // Member variables should appear before the WeakPtrFactory, to ensure 176 // Member variables should appear before the WeakPtrFactory, to ensure
175 // that any WeakPtrs to Controller are invalidated before its members 177 // that any WeakPtrs to Controller are invalidated before its members
176 // variable's destructors are executed, rendering them invalid. 178 // variable's destructors are executed, rendering them invalid.
177 base::WeakPtrFactory<GpuChannelManager> weak_factory_; 179 base::WeakPtrFactory<GpuChannelManager> weak_factory_;
178 180
179 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); 181 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager);
180 }; 182 };
181 183
182 } // namespace gpu 184 } // namespace gpu
183 185
184 #endif // GPU_IPC_SERVICE_GPU_CHANNEL_MANAGER_H_ 186 #endif // GPU_IPC_SERVICE_GPU_CHANNEL_MANAGER_H_
OLDNEW
« no previous file with comments | « gpu/ipc/service/gpu_channel.cc ('k') | gpu/ipc/service/gpu_channel_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698