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 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 | |
937 // Accelerated decode is not available at all with --disable-gpu. It may be | |
938 // possible to eventually support --single-process and/or --in-process-gpu, | |
939 // but currently it fails long before trying because the supported profiles | |
940 // list isn't initialized. Setting the disable flag in these case is important | |
941 // for Android, as there is no fallback path if the renderer process chooses | |
942 // wrong. | |
943 if (command_line->HasSwitch(switches::kDisableGpu) || | |
DaleCurtis
2016/01/06 21:03:22
This is going to mean no webview support since the
sandersd (OOO until July 31)
2016/01/06 22:20:38
I agree, but I don't think this is going to get fi
| |
944 command_line->HasSwitch(switches::kSingleProcess) || | |
945 command_line->HasSwitch(switches::kInProcessGPU)) { | |
946 return true; | |
947 } | |
948 | |
936 return false; | 949 return false; |
937 } | 950 } |
938 | 951 |
939 void GpuDataManagerImplPrivate::GetDisabledExtensions( | 952 void GpuDataManagerImplPrivate::GetDisabledExtensions( |
940 std::string* disabled_extensions) const { | 953 std::string* disabled_extensions) const { |
941 DCHECK(disabled_extensions); | 954 DCHECK(disabled_extensions); |
942 *disabled_extensions = disabled_extensions_; | 955 *disabled_extensions = disabled_extensions_; |
943 } | 956 } |
944 | 957 |
945 void GpuDataManagerImplPrivate::BlockDomainFrom3DAPIs( | 958 void GpuDataManagerImplPrivate::BlockDomainFrom3DAPIs( |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1226 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; | 1239 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; |
1227 #if defined(OS_WIN) | 1240 #if defined(OS_WIN) |
1228 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; | 1241 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; |
1229 #endif | 1242 #endif |
1230 complete_gpu_info_already_requested_ = true; | 1243 complete_gpu_info_already_requested_ = true; |
1231 // Some observers might be waiting. | 1244 // Some observers might be waiting. |
1232 NotifyGpuInfoUpdate(); | 1245 NotifyGpuInfoUpdate(); |
1233 } | 1246 } |
1234 | 1247 |
1235 } // namespace content | 1248 } // namespace content |
OLD | NEW |