| 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 "base/base64.h" | 7 #include "base/base64.h" |
| 8 #include "base/base_switches.h" | 8 #include "base/base_switches.h" |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 | 42 |
| 43 #if defined(OS_WIN) | 43 #if defined(OS_WIN) |
| 44 #include "base/win/windows_version.h" | 44 #include "base/win/windows_version.h" |
| 45 #include "content/common/sandbox_win.h" | 45 #include "content/common/sandbox_win.h" |
| 46 #include "content/public/common/sandboxed_process_launcher_delegate.h" | 46 #include "content/public/common/sandboxed_process_launcher_delegate.h" |
| 47 #include "sandbox/win/src/sandbox_policy.h" | 47 #include "sandbox/win/src/sandbox_policy.h" |
| 48 #include "ui/gfx/switches.h" | 48 #include "ui/gfx/switches.h" |
| 49 #endif | 49 #endif |
| 50 | 50 |
| 51 #if defined(OS_CHROMEOS) |
| 52 #include "chromeos/chromeos_switches.h" |
| 53 #endif |
| 54 |
| 51 #if defined(USE_OZONE) | 55 #if defined(USE_OZONE) |
| 52 #include "ui/ozone/ozone_switches.h" | 56 #include "ui/ozone/ozone_switches.h" |
| 53 #endif | 57 #endif |
| 54 | 58 |
| 55 namespace content { | 59 namespace content { |
| 56 | 60 |
| 57 bool GpuProcessHost::gpu_enabled_ = true; | 61 bool GpuProcessHost::gpu_enabled_ = true; |
| 58 bool GpuProcessHost::hardware_gpu_enabled_ = true; | 62 bool GpuProcessHost::hardware_gpu_enabled_ = true; |
| 59 | 63 |
| 60 namespace { | 64 namespace { |
| (...skipping 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1082 switches::kDisableGpuWatchdog, | 1086 switches::kDisableGpuWatchdog, |
| 1083 switches::kDisableLogging, | 1087 switches::kDisableLogging, |
| 1084 switches::kDisableSeccompFilterSandbox, | 1088 switches::kDisableSeccompFilterSandbox, |
| 1085 #if defined(ENABLE_WEBRTC) | 1089 #if defined(ENABLE_WEBRTC) |
| 1086 switches::kDisableWebRtcHWEncoding, | 1090 switches::kDisableWebRtcHWEncoding, |
| 1087 #endif | 1091 #endif |
| 1088 switches::kEnableLogging, | 1092 switches::kEnableLogging, |
| 1089 switches::kEnableShareGroupAsyncTextureUpload, | 1093 switches::kEnableShareGroupAsyncTextureUpload, |
| 1090 switches::kGpuStartupDialog, | 1094 switches::kGpuStartupDialog, |
| 1091 switches::kGpuSandboxAllowSysVShm, | 1095 switches::kGpuSandboxAllowSysVShm, |
| 1092 switches::kGpuSandboxFailuresNonfatal, | |
| 1093 switches::kLoggingLevel, | 1096 switches::kLoggingLevel, |
| 1094 switches::kNoSandbox, | 1097 switches::kNoSandbox, |
| 1095 switches::kTestGLLib, | 1098 switches::kTestGLLib, |
| 1096 switches::kTraceStartup, | 1099 switches::kTraceStartup, |
| 1097 switches::kV, | 1100 switches::kV, |
| 1098 switches::kVModule, | 1101 switches::kVModule, |
| 1099 #if defined(OS_MACOSX) | 1102 #if defined(OS_MACOSX) |
| 1100 switches::kEnableSandboxLogging, | 1103 switches::kEnableSandboxLogging, |
| 1101 #endif | 1104 #endif |
| 1105 #if defined(OS_CHROMEOS) |
| 1106 chromeos::switches::kGpuSandboxFailuresNonfatal, |
| 1107 #endif |
| 1102 #if defined(USE_OZONE) | 1108 #if defined(USE_OZONE) |
| 1103 switches::kOzonePlatform, | 1109 switches::kOzonePlatform, |
| 1104 #endif | 1110 #endif |
| 1105 #if defined(OS_WIN) | 1111 #if defined(OS_WIN) |
| 1106 switches::kHighDPISupport, | 1112 switches::kHighDPISupport, |
| 1107 #endif | 1113 #endif |
| 1108 }; | 1114 }; |
| 1109 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames, | 1115 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames, |
| 1110 arraysize(kSwitchNames)); | 1116 arraysize(kSwitchNames)); |
| 1111 cmd_line->CopySwitchesFrom( | 1117 cmd_line->CopySwitchesFrom( |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1218 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); | 1224 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); |
| 1219 ClientIdToShaderCacheMap::iterator iter = | 1225 ClientIdToShaderCacheMap::iterator iter = |
| 1220 client_id_to_shader_cache_.find(client_id); | 1226 client_id_to_shader_cache_.find(client_id); |
| 1221 // If the cache doesn't exist then this is an off the record profile. | 1227 // If the cache doesn't exist then this is an off the record profile. |
| 1222 if (iter == client_id_to_shader_cache_.end()) | 1228 if (iter == client_id_to_shader_cache_.end()) |
| 1223 return; | 1229 return; |
| 1224 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); | 1230 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); |
| 1225 } | 1231 } |
| 1226 | 1232 |
| 1227 } // namespace content | 1233 } // namespace content |
| OLD | NEW |