| 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 #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 Loading... |
| 101 int GpuProcessHost::gpu_recent_crash_count_ = 0; | 101 int GpuProcessHost::gpu_recent_crash_count_ = 0; |
| 102 bool GpuProcessHost::crashed_before_ = false; | 102 bool GpuProcessHost::crashed_before_ = false; |
| 103 int GpuProcessHost::swiftshader_crash_count_ = 0; | 103 int GpuProcessHost::swiftshader_crash_count_ = 0; |
| 104 | 104 |
| 105 namespace { | 105 namespace { |
| 106 | 106 |
| 107 // Command-line switches to propagate to the GPU process. | 107 // Command-line switches to propagate to the GPU process. |
| 108 static const char* const kSwitchNames[] = { | 108 static const char* const kSwitchNames[] = { |
| 109 switches::kDisableAcceleratedVideoDecode, | 109 switches::kDisableAcceleratedVideoDecode, |
| 110 switches::kDisableBreakpad, | 110 switches::kDisableBreakpad, |
| 111 switches::kDisableES3GLContext, |
| 111 switches::kDisableGpuSandbox, | 112 switches::kDisableGpuSandbox, |
| 112 switches::kDisableGpuWatchdog, | 113 switches::kDisableGpuWatchdog, |
| 113 switches::kDisableGLExtensions, | 114 switches::kDisableGLExtensions, |
| 114 switches::kDisableLogging, | 115 switches::kDisableLogging, |
| 115 switches::kDisableSeccompFilterSandbox, | 116 switches::kDisableSeccompFilterSandbox, |
| 116 #if defined(ENABLE_WEBRTC) | 117 #if defined(ENABLE_WEBRTC) |
| 117 switches::kDisableWebRtcHWEncoding, | 118 switches::kDisableWebRtcHWEncoding, |
| 118 #endif | 119 #endif |
| 119 #if defined(OS_WIN) | 120 #if defined(OS_WIN) |
| 120 switches::kEnableAcceleratedVpxDecode, | 121 switches::kEnableAcceleratedVpxDecode, |
| (...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1165 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); | 1166 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); |
| 1166 ClientIdToShaderCacheMap::iterator iter = | 1167 ClientIdToShaderCacheMap::iterator iter = |
| 1167 client_id_to_shader_cache_.find(client_id); | 1168 client_id_to_shader_cache_.find(client_id); |
| 1168 // If the cache doesn't exist then this is an off the record profile. | 1169 // If the cache doesn't exist then this is an off the record profile. |
| 1169 if (iter == client_id_to_shader_cache_.end()) | 1170 if (iter == client_id_to_shader_cache_.end()) |
| 1170 return; | 1171 return; |
| 1171 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); | 1172 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); |
| 1172 } | 1173 } |
| 1173 | 1174 |
| 1174 } // namespace content | 1175 } // namespace content |
| OLD | NEW |