| 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 | |
| 55 #if defined(USE_OZONE) | 51 #if defined(USE_OZONE) |
| 56 #include "ui/ozone/ozone_switches.h" | 52 #include "ui/ozone/ozone_switches.h" |
| 57 #endif | 53 #endif |
| 58 | 54 |
| 59 namespace content { | 55 namespace content { |
| 60 | 56 |
| 61 bool GpuProcessHost::gpu_enabled_ = true; | 57 bool GpuProcessHost::gpu_enabled_ = true; |
| 62 bool GpuProcessHost::hardware_gpu_enabled_ = true; | 58 bool GpuProcessHost::hardware_gpu_enabled_ = true; |
| 63 | 59 |
| 64 namespace { | 60 namespace { |
| (...skipping 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1086 switches::kDisableGpuWatchdog, | 1082 switches::kDisableGpuWatchdog, |
| 1087 switches::kDisableLogging, | 1083 switches::kDisableLogging, |
| 1088 switches::kDisableSeccompFilterSandbox, | 1084 switches::kDisableSeccompFilterSandbox, |
| 1089 #if defined(ENABLE_WEBRTC) | 1085 #if defined(ENABLE_WEBRTC) |
| 1090 switches::kDisableWebRtcHWEncoding, | 1086 switches::kDisableWebRtcHWEncoding, |
| 1091 #endif | 1087 #endif |
| 1092 switches::kEnableLogging, | 1088 switches::kEnableLogging, |
| 1093 switches::kEnableShareGroupAsyncTextureUpload, | 1089 switches::kEnableShareGroupAsyncTextureUpload, |
| 1094 switches::kGpuStartupDialog, | 1090 switches::kGpuStartupDialog, |
| 1095 switches::kGpuSandboxAllowSysVShm, | 1091 switches::kGpuSandboxAllowSysVShm, |
| 1092 switches::kGpuSandboxFailuresNonfatal, |
| 1096 switches::kLoggingLevel, | 1093 switches::kLoggingLevel, |
| 1097 switches::kNoSandbox, | 1094 switches::kNoSandbox, |
| 1098 switches::kTestGLLib, | 1095 switches::kTestGLLib, |
| 1099 switches::kTraceStartup, | 1096 switches::kTraceStartup, |
| 1100 switches::kV, | 1097 switches::kV, |
| 1101 switches::kVModule, | 1098 switches::kVModule, |
| 1102 #if defined(OS_MACOSX) | 1099 #if defined(OS_MACOSX) |
| 1103 switches::kEnableSandboxLogging, | 1100 switches::kEnableSandboxLogging, |
| 1104 #endif | 1101 #endif |
| 1105 #if defined(OS_CHROMEOS) | |
| 1106 chromeos::switches::kGpuSandboxFailuresNonfatal, | |
| 1107 #endif | |
| 1108 #if defined(USE_AURA) | 1102 #if defined(USE_AURA) |
| 1109 switches::kUIPrioritizeInGpuProcess, | 1103 switches::kUIPrioritizeInGpuProcess, |
| 1110 #endif | 1104 #endif |
| 1111 #if defined(USE_OZONE) | 1105 #if defined(USE_OZONE) |
| 1112 switches::kOzonePlatform, | 1106 switches::kOzonePlatform, |
| 1113 #endif | 1107 #endif |
| 1114 #if defined(OS_WIN) | 1108 #if defined(OS_WIN) |
| 1115 switches::kHighDPISupport, | 1109 switches::kHighDPISupport, |
| 1116 #endif | 1110 #endif |
| 1117 }; | 1111 }; |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1227 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); | 1221 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); |
| 1228 ClientIdToShaderCacheMap::iterator iter = | 1222 ClientIdToShaderCacheMap::iterator iter = |
| 1229 client_id_to_shader_cache_.find(client_id); | 1223 client_id_to_shader_cache_.find(client_id); |
| 1230 // If the cache doesn't exist then this is an off the record profile. | 1224 // If the cache doesn't exist then this is an off the record profile. |
| 1231 if (iter == client_id_to_shader_cache_.end()) | 1225 if (iter == client_id_to_shader_cache_.end()) |
| 1232 return; | 1226 return; |
| 1233 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); | 1227 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); |
| 1234 } | 1228 } |
| 1235 | 1229 |
| 1236 } // namespace content | 1230 } // namespace content |
| OLD | NEW |