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 #if defined(OS_ANDROID) |
| 937 if (command_line->HasSwitch(switches::kDisableGpu) || |
| 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 |