OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_data_manager_impl_private.h" | 5 #include "content/browser/gpu/gpu_data_manager_impl_private.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
910 if (ShouldUseWarp()) | 910 if (ShouldUseWarp()) |
911 return true; | 911 return true; |
912 if (ShouldUseSwiftShader()) | 912 if (ShouldUseSwiftShader()) |
913 return false; | 913 return false; |
914 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_GPU_COMPOSITING)) | 914 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_GPU_COMPOSITING)) |
915 return false; | 915 return false; |
916 return true; | 916 return true; |
917 } | 917 } |
918 | 918 |
919 | 919 |
920 bool GpuDataManagerImplPrivate::ShouldDisableAcceleratedVideoDecode( | 920 bool GpuDataManagerImplPrivate::ShouldDisableAcceleratedVideoDecode( |
sandersd (OOO until July 31)
2016/01/06 00:56:20
I'm not certain that this is the best place.
| |
921 const base::CommandLine* command_line) const { | 921 const base::CommandLine* command_line) const { |
922 // Make sure that we initialize the experiment first to make sure that | 922 // Make sure that we initialize the experiment first to make sure that |
923 // statistics are bucket correctly in all cases. | 923 // statistics are bucket correctly in all cases. |
924 // This experiment is temporary and will be removed once enough data | 924 // This experiment is temporary and will be removed once enough data |
925 // to resolve crbug/442039 has been collected. | 925 // to resolve crbug/442039 has been collected. |
926 const std::string group_name = base::FieldTrialList::FindFullName( | 926 const std::string group_name = base::FieldTrialList::FindFullName( |
927 "DisableAcceleratedVideoDecode"); | 927 "DisableAcceleratedVideoDecode"); |
928 if (command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) { | 928 if (command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) { |
929 // It was already disabled on the command line. | 929 // It was already disabled on the command line. |
930 return false; | 930 return false; |
931 } | 931 } |
932 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE)) | 932 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE)) |
933 return true; | 933 return true; |
934 if (group_name == "Disabled") | 934 if (group_name == "Disabled") |
935 return true; | 935 return true; |
936 #if defined(OS_ANDROID) | |
937 if (command_line->HasSwitch(switches::kDisableGpu) || | |
sandersd (OOO until July 31)
2016/01/06 00:56:20
This one should probably apply to all platforms?
| |
938 command_line->HasSwitch(switches::kSingleProcess) || | |
939 command_line->HasSwitch(switches::kInProcessGPU)) { | |
940 return true; | |
941 } | |
942 #endif // defined(OS_ANDROID) | |
936 return false; | 943 return false; |
937 } | 944 } |
938 | 945 |
939 void GpuDataManagerImplPrivate::GetDisabledExtensions( | 946 void GpuDataManagerImplPrivate::GetDisabledExtensions( |
940 std::string* disabled_extensions) const { | 947 std::string* disabled_extensions) const { |
941 DCHECK(disabled_extensions); | 948 DCHECK(disabled_extensions); |
942 *disabled_extensions = disabled_extensions_; | 949 *disabled_extensions = disabled_extensions_; |
943 } | 950 } |
944 | 951 |
945 void GpuDataManagerImplPrivate::BlockDomainFrom3DAPIs( | 952 void GpuDataManagerImplPrivate::BlockDomainFrom3DAPIs( |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1226 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; | 1233 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; |
1227 #if defined(OS_WIN) | 1234 #if defined(OS_WIN) |
1228 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; | 1235 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; |
1229 #endif | 1236 #endif |
1230 complete_gpu_info_already_requested_ = true; | 1237 complete_gpu_info_already_requested_ = true; |
1231 // Some observers might be waiting. | 1238 // Some observers might be waiting. |
1232 NotifyGpuInfoUpdate(); | 1239 NotifyGpuInfoUpdate(); |
1233 } | 1240 } |
1234 | 1241 |
1235 } // namespace content | 1242 } // namespace content |
OLD | NEW |