Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: content/browser/gpu/gpu_data_manager_impl_private.cc

Issue 1560953002: Implement fallback from WMPI to WMPA. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Only include MediaCodecUtil on Android. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/renderer/media/android/webmediaplayer_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 never available with --disable-gpu. It is also
938 // currently non-functional with --single-process and --in-process-gpu, but
939 // these should be fixable. We set the --disable-accelerated-video-decode flag
940 // in these cases so that the renderer can be aware. (Which is important on
941 // Android where there is no fallback once WMPI is selected.)
942 //
943 // TODO(sandersd): Enable support for accelerated decode with
944 // --in-process-gpu, at least on Android (necessary to support WebView).
945 // http://crbug.com/574935.
946 if (command_line->HasSwitch(switches::kDisableGpu) ||
947 command_line->HasSwitch(switches::kSingleProcess) ||
948 command_line->HasSwitch(switches::kInProcessGPU)) {
949 return true;
950 }
951
936 return false; 952 return false;
937 } 953 }
938 954
939 void GpuDataManagerImplPrivate::GetDisabledExtensions( 955 void GpuDataManagerImplPrivate::GetDisabledExtensions(
940 std::string* disabled_extensions) const { 956 std::string* disabled_extensions) const {
941 DCHECK(disabled_extensions); 957 DCHECK(disabled_extensions);
942 *disabled_extensions = disabled_extensions_; 958 *disabled_extensions = disabled_extensions_;
943 } 959 }
944 960
945 void GpuDataManagerImplPrivate::BlockDomainFrom3DAPIs( 961 void GpuDataManagerImplPrivate::BlockDomainFrom3DAPIs(
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
1226 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; 1242 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure;
1227 #if defined(OS_WIN) 1243 #if defined(OS_WIN)
1228 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; 1244 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure;
1229 #endif 1245 #endif
1230 complete_gpu_info_already_requested_ = true; 1246 complete_gpu_info_already_requested_ = true;
1231 // Some observers might be waiting. 1247 // Some observers might be waiting.
1232 NotifyGpuInfoUpdate(); 1248 NotifyGpuInfoUpdate();
1233 } 1249 }
1234 1250
1235 } // namespace content 1251 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/android/webmediaplayer_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698