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

Side by Side Diff: content/child/runtime_features.cc

Issue 343593003: Enable WebAudio on ARM64 and MIPS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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 | « build/common.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/child/runtime_features.h" 5 #include "content/child/runtime_features.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "content/common/content_switches_internal.h" 8 #include "content/common/content_switches_internal.h"
9 #include "content/public/common/content_switches.h" 9 #include "content/public/common/content_switches.h"
10 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" 10 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
(...skipping 10 matching lines...) Expand all
21 namespace content { 21 namespace content {
22 22
23 static void SetRuntimeFeatureDefaultsForPlatform() { 23 static void SetRuntimeFeatureDefaultsForPlatform() {
24 #if defined(OS_ANDROID) 24 #if defined(OS_ANDROID)
25 // MSE/EME implementation needs Android MediaCodec API. 25 // MSE/EME implementation needs Android MediaCodec API.
26 if (!media::MediaCodecBridge::IsAvailable()) { 26 if (!media::MediaCodecBridge::IsAvailable()) {
27 WebRuntimeFeatures::enableMediaSource(false); 27 WebRuntimeFeatures::enableMediaSource(false);
28 WebRuntimeFeatures::enablePrefixedEncryptedMedia(false); 28 WebRuntimeFeatures::enablePrefixedEncryptedMedia(false);
29 WebRuntimeFeatures::enableEncryptedMedia(false); 29 WebRuntimeFeatures::enableEncryptedMedia(false);
30 } 30 }
31 // WebAudio is enabled by default on ARM and X86 and only when the 31 // WebAudio is enabled by default but only when the MediaCodec API
32 // MediaCodec API is available. 32 // is available.
33 AndroidCpuFamily cpu_family = android_getCpuFamily();
33 WebRuntimeFeatures::enableWebAudio( 34 WebRuntimeFeatures::enableWebAudio(
34 media::MediaCodecBridge::IsAvailable() && 35 media::MediaCodecBridge::IsAvailable() &&
35 ((android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM) || 36 ((cpu_family == ANDROID_CPU_FAMILY_ARM) ||
36 (android_getCpuFamily() == ANDROID_CPU_FAMILY_X86))); 37 (cpu_family == ANDROID_CPU_FAMILY_ARM64) ||
38 (cpu_family == ANDROID_CPU_FAMILY_X86) ||
39 (cpu_family == ANDROID_CPU_FAMILY_MIPS)));
37 40
38 // Android supports gamepad API for JellyBean and beyond 41 // Android supports gamepad API for JellyBean and beyond
39 WebRuntimeFeatures::enableGamepad( 42 WebRuntimeFeatures::enableGamepad(
40 base::android::BuildInfo::GetInstance()->sdk_int() >= 16); 43 base::android::BuildInfo::GetInstance()->sdk_int() >= 16);
41 // Android does not have support for PagePopup 44 // Android does not have support for PagePopup
42 WebRuntimeFeatures::enablePagePopup(false); 45 WebRuntimeFeatures::enablePagePopup(false);
43 // Android does not yet support the Web Notification API. crbug.com/115320 46 // Android does not yet support the Web Notification API. crbug.com/115320
44 WebRuntimeFeatures::enableNotifications(false); 47 WebRuntimeFeatures::enableNotifications(false);
45 // Android does not yet support SharedWorker. crbug.com/154571 48 // Android does not yet support SharedWorker. crbug.com/154571
46 WebRuntimeFeatures::enableSharedWorker(false); 49 WebRuntimeFeatures::enableSharedWorker(false);
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 WebRuntimeFeatures::enableBleedingEdgeFastPaths(true); 164 WebRuntimeFeatures::enableBleedingEdgeFastPaths(true);
162 165
163 if (command_line.HasSwitch(switches::kEnablePreciseMemoryInfo)) 166 if (command_line.HasSwitch(switches::kEnablePreciseMemoryInfo))
164 WebRuntimeFeatures::enablePreciseMemoryInfo(true); 167 WebRuntimeFeatures::enablePreciseMemoryInfo(true);
165 168
166 if (command_line.HasSwitch(switches::kEnableLayerSquashing)) 169 if (command_line.HasSwitch(switches::kEnableLayerSquashing))
167 WebRuntimeFeatures::enableLayerSquashing(true); 170 WebRuntimeFeatures::enableLayerSquashing(true);
168 } 171 }
169 172
170 } // namespace content 173 } // namespace content
OLDNEW
« no previous file with comments | « build/common.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698