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

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

Issue 1871613002: Compute GpuDriverBugWorkarounds only one time in the GPU process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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 <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/containers/scoped_ptr_hash_map.h" 14 #include "base/containers/scoped_ptr_hash_map.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
17 #include "base/memory/scoped_ptr.h" 17 #include "base/memory/scoped_ptr.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/constants.h" 20 #include "gpu/command_buffer/common/constants.h"
21 #include "gpu/config/gpu_driver_bug_workarounds.h"
21 #include "gpu/gpu_export.h" 22 #include "gpu/gpu_export.h"
22 #include "gpu/ipc/service/gpu_memory_manager.h" 23 #include "gpu/ipc/service/gpu_memory_manager.h"
23 #include "ui/gfx/gpu_memory_buffer.h" 24 #include "ui/gfx/gpu_memory_buffer.h"
24 #include "ui/gfx/native_widget_types.h" 25 #include "ui/gfx/native_widget_types.h"
25 #include "ui/gl/gl_surface.h" 26 #include "ui/gl/gl_surface.h"
26 #include "url/gurl.h" 27 #include "url/gurl.h"
27 28
28 #if defined(OS_MACOSX) 29 #if defined(OS_MACOSX)
29 #include "base/callback.h" 30 #include "base/callback.h"
30 #include "base/containers/hash_tables.h" 31 #include "base/containers/hash_tables.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 const BufferPresentedCallback& callback); 115 const BufferPresentedCallback& callback);
115 void RemoveBufferPresentedCallback(int32_t routing_id); 116 void RemoveBufferPresentedCallback(int32_t routing_id);
116 void BufferPresented(int32_t surface_id, 117 void BufferPresented(int32_t surface_id,
117 const base::TimeTicks& vsync_timebase, 118 const base::TimeTicks& vsync_timebase,
118 const base::TimeDelta& vsync_interval); 119 const base::TimeDelta& vsync_interval);
119 #endif 120 #endif
120 121
121 const GpuPreferences& gpu_preferences() const { 122 const GpuPreferences& gpu_preferences() const {
122 return gpu_preferences_; 123 return gpu_preferences_;
123 } 124 }
125 const GpuDriverBugWorkarounds& gpu_driver_bug_workarounds() const {
126 return gpu_driver_bug_workarounds_;
127 }
124 gles2::ProgramCache* program_cache(); 128 gles2::ProgramCache* program_cache();
125 gles2::ShaderTranslatorCache* shader_translator_cache(); 129 gles2::ShaderTranslatorCache* shader_translator_cache();
126 gles2::FramebufferCompletenessCache* framebuffer_completeness_cache(); 130 gles2::FramebufferCompletenessCache* framebuffer_completeness_cache();
127 131
128 GpuMemoryManager* gpu_memory_manager() { return &gpu_memory_manager_; } 132 GpuMemoryManager* gpu_memory_manager() { return &gpu_memory_manager_; }
129 133
130 GpuChannel* LookupChannel(int32_t client_id) const; 134 GpuChannel* LookupChannel(int32_t client_id) const;
131 135
132 gfx::GLSurface* GetDefaultOffscreenSurface(); 136 gfx::GLSurface* GetDefaultOffscreenSurface();
133 137
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 private: 186 private:
183 void InternalDestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, int client_id); 187 void InternalDestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, int client_id);
184 void InternalDestroyGpuMemoryBufferOnIO(gfx::GpuMemoryBufferId id, 188 void InternalDestroyGpuMemoryBufferOnIO(gfx::GpuMemoryBufferId id,
185 int client_id); 189 int client_id);
186 #if defined(OS_ANDROID) 190 #if defined(OS_ANDROID)
187 void ScheduleWakeUpGpu(); 191 void ScheduleWakeUpGpu();
188 void DoWakeUpGpu(); 192 void DoWakeUpGpu();
189 #endif 193 #endif
190 194
191 const GpuPreferences& gpu_preferences_; 195 const GpuPreferences& gpu_preferences_;
196 GpuDriverBugWorkarounds gpu_driver_bug_workarounds_;
192 197
193 GpuChannelManagerDelegate* const delegate_; 198 GpuChannelManagerDelegate* const delegate_;
194 #if defined(OS_MACOSX) 199 #if defined(OS_MACOSX)
195 base::hash_map<int32_t, BufferPresentedCallback> 200 base::hash_map<int32_t, BufferPresentedCallback>
196 buffer_presented_callback_map_; 201 buffer_presented_callback_map_;
197 #endif 202 #endif
198 203
199 GpuWatchdog* watchdog_; 204 GpuWatchdog* watchdog_;
200 205
201 base::WaitableEvent* shutdown_event_; 206 base::WaitableEvent* shutdown_event_;
(...skipping 25 matching lines...) Expand all
227 // that any WeakPtrs to Controller are invalidated before its members 232 // that any WeakPtrs to Controller are invalidated before its members
228 // variable's destructors are executed, rendering them invalid. 233 // variable's destructors are executed, rendering them invalid.
229 base::WeakPtrFactory<GpuChannelManager> weak_factory_; 234 base::WeakPtrFactory<GpuChannelManager> weak_factory_;
230 235
231 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); 236 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager);
232 }; 237 };
233 238
234 } // namespace gpu 239 } // namespace gpu
235 240
236 #endif // GPU_IPC_SERVICE_GPU_CHANNEL_MANAGER_H_ 241 #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