| 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 27 matching lines...) Expand all Loading... |
| 38 #include "ipc/ipc_switches.h" | 38 #include "ipc/ipc_switches.h" |
| 39 #include "ui/events/latency_info.h" | 39 #include "ui/events/latency_info.h" |
| 40 #include "ui/gl/gl_switches.h" | 40 #include "ui/gl/gl_switches.h" |
| 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/surface/accelerated_surface_win.h" | 49 #include "ui/surface/accelerated_surface_win.h" |
| 49 #endif | 50 #endif |
| 50 | 51 |
| 51 #if defined(OS_CHROMEOS) | 52 #if defined(OS_CHROMEOS) |
| 52 #include "chromeos/chromeos_switches.h" | 53 #include "chromeos/chromeos_switches.h" |
| 53 #endif | 54 #endif |
| 54 | 55 |
| 55 #if defined(USE_OZONE) | 56 #if defined(USE_OZONE) |
| 56 #include "ui/ozone/ozone_switches.h" | 57 #include "ui/ozone/ozone_switches.h" |
| 57 #endif | 58 #endif |
| (...skipping 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1138 #endif | 1139 #endif |
| 1139 #if defined(OS_CHROMEOS) | 1140 #if defined(OS_CHROMEOS) |
| 1140 chromeos::switches::kGpuSandboxFailuresNonfatal, | 1141 chromeos::switches::kGpuSandboxFailuresNonfatal, |
| 1141 #endif | 1142 #endif |
| 1142 #if defined(USE_AURA) | 1143 #if defined(USE_AURA) |
| 1143 switches::kUIPrioritizeInGpuProcess, | 1144 switches::kUIPrioritizeInGpuProcess, |
| 1144 #endif | 1145 #endif |
| 1145 #if defined(USE_OZONE) | 1146 #if defined(USE_OZONE) |
| 1146 switches::kOzonePlatform, | 1147 switches::kOzonePlatform, |
| 1147 #endif | 1148 #endif |
| 1149 #if defined(OS_WIN) && defined(USE_AURA) |
| 1150 switches::kHighDPISupport, |
| 1151 #endif |
| 1148 }; | 1152 }; |
| 1149 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames, | 1153 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames, |
| 1150 arraysize(kSwitchNames)); | 1154 arraysize(kSwitchNames)); |
| 1151 cmd_line->CopySwitchesFrom( | 1155 cmd_line->CopySwitchesFrom( |
| 1152 browser_command_line, switches::kGpuSwitches, switches::kNumGpuSwitches); | 1156 browser_command_line, switches::kGpuSwitches, switches::kNumGpuSwitches); |
| 1153 cmd_line->CopySwitchesFrom( | 1157 cmd_line->CopySwitchesFrom( |
| 1154 browser_command_line, switches::kGLSwitchesCopiedFromGpuProcessHost, | 1158 browser_command_line, switches::kGLSwitchesCopiedFromGpuProcessHost, |
| 1155 switches::kGLSwitchesCopiedFromGpuProcessHostNumSwitches); | 1159 switches::kGLSwitchesCopiedFromGpuProcessHostNumSwitches); |
| 1156 | 1160 |
| 1157 GetContentClient()->browser()->AppendExtraCommandLineSwitches( | 1161 GetContentClient()->browser()->AppendExtraCommandLineSwitches( |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1257 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); | 1261 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); |
| 1258 ClientIdToShaderCacheMap::iterator iter = | 1262 ClientIdToShaderCacheMap::iterator iter = |
| 1259 client_id_to_shader_cache_.find(client_id); | 1263 client_id_to_shader_cache_.find(client_id); |
| 1260 // If the cache doesn't exist then this is an off the record profile. | 1264 // If the cache doesn't exist then this is an off the record profile. |
| 1261 if (iter == client_id_to_shader_cache_.end()) | 1265 if (iter == client_id_to_shader_cache_.end()) |
| 1262 return; | 1266 return; |
| 1263 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); | 1267 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); |
| 1264 } | 1268 } |
| 1265 | 1269 |
| 1266 } // namespace content | 1270 } // namespace content |
| OLD | NEW |