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

Side by Side Diff: content/browser/gpu/gpu_process_host.cc

Issue 2467103003: gl_context_glx: add workaround to create default context (Closed)
Patch Set: WIP Created 4 years, 1 month 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 #include "content/browser/gpu/gpu_process_host.h" 5 #include "content/browser/gpu/gpu_process_host.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <list> 10 #include <list>
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 bool GpuProcessHost::hardware_gpu_enabled_ = true; 101 bool GpuProcessHost::hardware_gpu_enabled_ = true;
102 int GpuProcessHost::gpu_crash_count_ = 0; 102 int GpuProcessHost::gpu_crash_count_ = 0;
103 int GpuProcessHost::gpu_recent_crash_count_ = 0; 103 int GpuProcessHost::gpu_recent_crash_count_ = 0;
104 bool GpuProcessHost::crashed_before_ = false; 104 bool GpuProcessHost::crashed_before_ = false;
105 int GpuProcessHost::swiftshader_crash_count_ = 0; 105 int GpuProcessHost::swiftshader_crash_count_ = 0;
106 106
107 namespace { 107 namespace {
108 108
109 // Command-line switches to propagate to the GPU process. 109 // Command-line switches to propagate to the GPU process.
110 static const char* const kSwitchNames[] = { 110 static const char* const kSwitchNames[] = {
111 switches::kCreateDefaultContext,
111 switches::kDisableAcceleratedVideoDecode, 112 switches::kDisableAcceleratedVideoDecode,
112 switches::kDisableBreakpad, 113 switches::kDisableBreakpad,
113 switches::kDisableES3GLContext, 114 switches::kDisableES3GLContext,
114 switches::kDisableGpuSandbox, 115 switches::kDisableGpuSandbox,
115 switches::kDisableGpuWatchdog, 116 switches::kDisableGpuWatchdog,
116 switches::kDisableGLExtensions, 117 switches::kDisableGLExtensions,
117 switches::kDisableLogging, 118 switches::kDisableLogging,
118 switches::kDisableSeccompFilterSandbox, 119 switches::kDisableSeccompFilterSandbox,
119 #if defined(ENABLE_WEBRTC) 120 #if defined(ENABLE_WEBRTC)
120 switches::kDisableWebRtcHWEncoding, 121 switches::kDisableWebRtcHWEncoding,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 #endif 154 #endif
154 #if defined(USE_OZONE) 155 #if defined(USE_OZONE)
155 switches::kOzonePlatform, 156 switches::kOzonePlatform,
156 #endif 157 #endif
157 #if defined(USE_X11) && !defined(OS_CHROMEOS) 158 #if defined(USE_X11) && !defined(OS_CHROMEOS)
158 switches::kX11Display, 159 switches::kX11Display,
159 #endif 160 #endif
160 switches::kGpuTestingGLVendor, 161 switches::kGpuTestingGLVendor,
161 switches::kGpuTestingGLRenderer, 162 switches::kGpuTestingGLRenderer,
162 switches::kGpuTestingGLVersion, 163 switches::kGpuTestingGLVersion,
163 switches::kDisableGpuDriverBugWorkarounds 164 switches::kDisableGpuDriverBugWorkarounds};
164 };
165 165
166 enum GPUProcessLifetimeEvent { 166 enum GPUProcessLifetimeEvent {
167 LAUNCHED, 167 LAUNCHED,
168 DIED_FIRST_TIME, 168 DIED_FIRST_TIME,
169 DIED_SECOND_TIME, 169 DIED_SECOND_TIME,
170 DIED_THIRD_TIME, 170 DIED_THIRD_TIME,
171 DIED_FOURTH_TIME, 171 DIED_FOURTH_TIME,
172 GPU_PROCESS_LIFETIME_EVENT_MAX = 100 172 GPU_PROCESS_LIFETIME_EVENT_MAX = 100
173 }; 173 };
174 174
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); 1197 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader");
1198 ClientIdToShaderCacheMap::iterator iter = 1198 ClientIdToShaderCacheMap::iterator iter =
1199 client_id_to_shader_cache_.find(client_id); 1199 client_id_to_shader_cache_.find(client_id);
1200 // If the cache doesn't exist then this is an off the record profile. 1200 // If the cache doesn't exist then this is an off the record profile.
1201 if (iter == client_id_to_shader_cache_.end()) 1201 if (iter == client_id_to_shader_cache_.end())
1202 return; 1202 return;
1203 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); 1203 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader);
1204 } 1204 }
1205 1205
1206 } // namespace content 1206 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698