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 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
925 if (kind_ == GPU_PROCESS_KIND_UNSANDBOXED) | 925 if (kind_ == GPU_PROCESS_KIND_UNSANDBOXED) |
926 cmd_line->AppendSwitch(switches::kDisableGpuSandbox); | 926 cmd_line->AppendSwitch(switches::kDisableGpuSandbox); |
927 | 927 |
928 // Propagate relevant command line switches. | 928 // Propagate relevant command line switches. |
929 static const char* const kSwitchNames[] = { | 929 static const char* const kSwitchNames[] = { |
930 switches::kDisableAcceleratedVideoDecode, | 930 switches::kDisableAcceleratedVideoDecode, |
931 switches::kDisableBreakpad, | 931 switches::kDisableBreakpad, |
932 switches::kDisableGpuSandbox, | 932 switches::kDisableGpuSandbox, |
933 switches::kDisableGpuWatchdog, | 933 switches::kDisableGpuWatchdog, |
934 switches::kDisableLogging, | 934 switches::kDisableLogging, |
| 935 switches::kDisableLowEndDeviceMode, |
935 switches::kDisableSeccompFilterSandbox, | 936 switches::kDisableSeccompFilterSandbox, |
936 #if defined(ENABLE_WEBRTC) | 937 #if defined(ENABLE_WEBRTC) |
937 switches::kDisableWebRtcHWEncoding, | 938 switches::kDisableWebRtcHWEncoding, |
938 #endif | 939 #endif |
939 switches::kEnableLogging, | 940 switches::kEnableLogging, |
| 941 switches::kEnableLowEndDeviceMode, |
940 switches::kEnableShareGroupAsyncTextureUpload, | 942 switches::kEnableShareGroupAsyncTextureUpload, |
941 switches::kGpuStartupDialog, | 943 switches::kGpuStartupDialog, |
942 switches::kGpuSandboxAllowSysVShm, | 944 switches::kGpuSandboxAllowSysVShm, |
943 switches::kGpuSandboxFailuresFatal, | 945 switches::kGpuSandboxFailuresFatal, |
944 switches::kGpuSandboxStartAfterInitialization, | 946 switches::kGpuSandboxStartAfterInitialization, |
945 switches::kIgnoreResolutionLimitsForAcceleratedVideoDecode, | 947 switches::kIgnoreResolutionLimitsForAcceleratedVideoDecode, |
946 switches::kLoggingLevel, | 948 switches::kLoggingLevel, |
947 switches::kNoSandbox, | 949 switches::kNoSandbox, |
948 switches::kTestGLLib, | 950 switches::kTestGLLib, |
949 switches::kTraceStartup, | 951 switches::kTraceStartup, |
950 switches::kV, | 952 switches::kV, |
951 switches::kVModule, | 953 switches::kVModule, |
952 #if defined(OS_MACOSX) | 954 #if defined(OS_MACOSX) |
953 switches::kEnableSandboxLogging, | 955 switches::kEnableSandboxLogging, |
954 #endif | 956 #endif |
955 #if defined(USE_AURA) | 957 #if defined(USE_AURA) |
956 switches::kUIPrioritizeInGpuProcess, | 958 switches::kUIPrioritizeInGpuProcess, |
957 #endif | 959 #endif |
958 #if defined(USE_OZONE) | 960 #if defined(USE_OZONE) |
959 switches::kOzonePlatform, | 961 switches::kOzonePlatform, |
960 #endif | 962 #endif |
| 963 #if !defined(OS_ANDROID) |
| 964 switches::kDetectLowEndDevice, |
| 965 #endif |
961 #if defined(USE_X11) && !defined(OS_CHROMEOS) | 966 #if defined(USE_X11) && !defined(OS_CHROMEOS) |
962 switches::kX11Display, | 967 switches::kX11Display, |
963 #endif | 968 #endif |
964 }; | 969 }; |
965 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames, | 970 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames, |
966 arraysize(kSwitchNames)); | 971 arraysize(kSwitchNames)); |
967 cmd_line->CopySwitchesFrom( | 972 cmd_line->CopySwitchesFrom( |
968 browser_command_line, switches::kGpuSwitches, switches::kNumGpuSwitches); | 973 browser_command_line, switches::kGpuSwitches, switches::kNumGpuSwitches); |
969 cmd_line->CopySwitchesFrom( | 974 cmd_line->CopySwitchesFrom( |
970 browser_command_line, switches::kGLSwitchesCopiedFromGpuProcessHost, | 975 browser_command_line, switches::kGLSwitchesCopiedFromGpuProcessHost, |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1069 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); | 1074 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); |
1070 ClientIdToShaderCacheMap::iterator iter = | 1075 ClientIdToShaderCacheMap::iterator iter = |
1071 client_id_to_shader_cache_.find(client_id); | 1076 client_id_to_shader_cache_.find(client_id); |
1072 // If the cache doesn't exist then this is an off the record profile. | 1077 // If the cache doesn't exist then this is an off the record profile. |
1073 if (iter == client_id_to_shader_cache_.end()) | 1078 if (iter == client_id_to_shader_cache_.end()) |
1074 return; | 1079 return; |
1075 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); | 1080 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); |
1076 } | 1081 } |
1077 | 1082 |
1078 } // namespace content | 1083 } // namespace content |
OLD | NEW |