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 903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
914 cmd_line->AppendSwitch(switches::kDisableGpuSandbox); | 914 cmd_line->AppendSwitch(switches::kDisableGpuSandbox); |
915 | 915 |
916 // Propagate relevant command line switches. | 916 // Propagate relevant command line switches. |
917 static const char* const kSwitchNames[] = { | 917 static const char* const kSwitchNames[] = { |
918 switches::kDisableAcceleratedVideoDecode, | 918 switches::kDisableAcceleratedVideoDecode, |
919 switches::kDisableBreakpad, | 919 switches::kDisableBreakpad, |
920 switches::kDisableGLDrawingForTests, | 920 switches::kDisableGLDrawingForTests, |
921 switches::kDisableGpuSandbox, | 921 switches::kDisableGpuSandbox, |
922 switches::kDisableGpuWatchdog, | 922 switches::kDisableGpuWatchdog, |
923 switches::kDisableLogging, | 923 switches::kDisableLogging, |
| 924 switches::kDisableLowEndDeviceMode, |
924 switches::kDisableSeccompFilterSandbox, | 925 switches::kDisableSeccompFilterSandbox, |
925 #if defined(ENABLE_WEBRTC) | 926 #if defined(ENABLE_WEBRTC) |
926 switches::kDisableWebRtcHWEncoding, | 927 switches::kDisableWebRtcHWEncoding, |
927 #endif | 928 #endif |
928 switches::kEnableLogging, | 929 switches::kEnableLogging, |
| 930 switches::kEnableLowEndDeviceMode, |
929 switches::kEnableShareGroupAsyncTextureUpload, | 931 switches::kEnableShareGroupAsyncTextureUpload, |
930 switches::kGpuStartupDialog, | 932 switches::kGpuStartupDialog, |
931 switches::kGpuSandboxAllowSysVShm, | 933 switches::kGpuSandboxAllowSysVShm, |
932 switches::kGpuSandboxFailuresFatal, | 934 switches::kGpuSandboxFailuresFatal, |
933 switches::kGpuSandboxStartAfterInitialization, | 935 switches::kGpuSandboxStartAfterInitialization, |
934 switches::kLoggingLevel, | 936 switches::kLoggingLevel, |
935 switches::kNoSandbox, | 937 switches::kNoSandbox, |
936 switches::kTestGLLib, | 938 switches::kTestGLLib, |
937 switches::kTraceStartup, | 939 switches::kTraceStartup, |
938 switches::kV, | 940 switches::kV, |
939 switches::kVModule, | 941 switches::kVModule, |
940 #if defined(OS_MACOSX) | 942 #if defined(OS_MACOSX) |
941 switches::kEnableSandboxLogging, | 943 switches::kEnableSandboxLogging, |
942 #endif | 944 #endif |
943 #if defined(USE_AURA) | 945 #if defined(USE_AURA) |
944 switches::kUIPrioritizeInGpuProcess, | 946 switches::kUIPrioritizeInGpuProcess, |
945 #endif | 947 #endif |
946 #if defined(USE_OZONE) | 948 #if defined(USE_OZONE) |
947 switches::kOzonePlatform, | 949 switches::kOzonePlatform, |
948 #endif | 950 #endif |
949 #if defined(OS_WIN) | 951 #if defined(OS_WIN) |
950 switches::kHighDPISupport, | 952 switches::kHighDPISupport, |
951 #endif | 953 #endif |
| 954 #if !defined(OS_ANDROID) |
| 955 switches::kDetectLowEndDevice, |
| 956 #endif |
952 }; | 957 }; |
953 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames, | 958 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames, |
954 arraysize(kSwitchNames)); | 959 arraysize(kSwitchNames)); |
955 cmd_line->CopySwitchesFrom( | 960 cmd_line->CopySwitchesFrom( |
956 browser_command_line, switches::kGpuSwitches, switches::kNumGpuSwitches); | 961 browser_command_line, switches::kGpuSwitches, switches::kNumGpuSwitches); |
957 cmd_line->CopySwitchesFrom( | 962 cmd_line->CopySwitchesFrom( |
958 browser_command_line, switches::kGLSwitchesCopiedFromGpuProcessHost, | 963 browser_command_line, switches::kGLSwitchesCopiedFromGpuProcessHost, |
959 switches::kGLSwitchesCopiedFromGpuProcessHostNumSwitches); | 964 switches::kGLSwitchesCopiedFromGpuProcessHostNumSwitches); |
960 | 965 |
961 GetContentClient()->browser()->AppendExtraCommandLineSwitches( | 966 GetContentClient()->browser()->AppendExtraCommandLineSwitches( |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1057 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); | 1062 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); |
1058 ClientIdToShaderCacheMap::iterator iter = | 1063 ClientIdToShaderCacheMap::iterator iter = |
1059 client_id_to_shader_cache_.find(client_id); | 1064 client_id_to_shader_cache_.find(client_id); |
1060 // If the cache doesn't exist then this is an off the record profile. | 1065 // If the cache doesn't exist then this is an off the record profile. |
1061 if (iter == client_id_to_shader_cache_.end()) | 1066 if (iter == client_id_to_shader_cache_.end()) |
1062 return; | 1067 return; |
1063 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); | 1068 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); |
1064 } | 1069 } |
1065 | 1070 |
1066 } // namespace content | 1071 } // namespace content |
OLD | NEW |