Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ public static List<String> getDefaultCommandLineOverridesList() {
paramOverrides.add("--force-video-overlays");
// Autoplay video with url.
paramOverrides.add("--autoplay-policy=no-user-gesture-required");
// Remove below if Cobalt rebase to m120+.
paramOverrides.add("--user-level-memory-pressure-signal-params");
// Disable rescaling Webpage.
paramOverrides.add("--force-device-scale-factor=1");
// Enable low end device mode.
Expand All @@ -75,9 +73,6 @@ public static List<String> getDefaultCommandLineOverridesList() {
paramOverrides.add("--disable-accelerated-video-encode");
// Rasterize Tiles directly to GPU memory.
paramOverrides.add("--enable-zero-copy");
// Disable QUIC to save CPU budgets on m114.
// Remove below if Cobalt rebase to m138+.
paramOverrides.add("--disable-quic");

return paramOverrides;
}
Expand Down Expand Up @@ -117,9 +112,6 @@ public static StringJoiner getDefaultDisableFeatureOverridesList() {
public static StringJoiner getDefaultBlinkEnableFeatureOverridesList() {
StringJoiner paramOverrides = new StringJoiner(",");

// Align with MSE spec for MediaSource.duration.
paramOverrides.add("MediaSourceNewAbortAndDuration");

// Enable precise memory info so we can make accurate client-side
// measurements.
paramOverrides.add("PreciseMemoryInfo");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ public void testDefaultDisableFeatureOverridesList() {
public void testDefaultBlinkEnableFeatureOverridesList() {
String overrides =
CommandLineOverrideHelper.getDefaultBlinkEnableFeatureOverridesList().toString();
assertThat(overrides.contains("MediaSourceNewAbortAndDuration")).isTrue();
assertThat(overrides.contains("PreciseMemoryInfo")).isTrue();
}

Expand All @@ -73,8 +72,6 @@ public void testFlagOverrides_NullParam() {

Assert.assertTrue(CommandLine.getInstance().hasSwitch("single-process"));
Assert.assertTrue(CommandLine.getInstance().hasSwitch("force-video-overlays"));
Assert.assertTrue(
CommandLine.getInstance().hasSwitch("user-level-memory-pressure-signal-params"));
Assert.assertTrue(CommandLine.getInstance().hasSwitch("enable-low-end-device-mode"));
Assert.assertTrue(CommandLine.getInstance().hasSwitch("disable-rgba-4444-textures"));
Assert.assertTrue(CommandLine.getInstance().hasSwitch("disable-accelerated-video-decode"));
Expand Down
65 changes: 28 additions & 37 deletions cobalt/app/cobalt_switch_defaults_starboard.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,39 +43,32 @@ namespace {

// List of toggleable default switches.
static constexpr auto kCobaltToggleSwitches = std::to_array<const char*>({
// Enable Blink to work in overlay video mode
switches::kForceVideoOverlays,
// Disable multiprocess mode.
switches::kSingleProcess,
// Hide content shell toolbar.
switches::kContentShellHideToolbar,
// Accelerated GL is blanket disabled for Linux. Ignore the GPU blocklist
// to enable it.
switches::kIgnoreGpuBlocklist,
#if BUILDFLAG(IS_ANDROID)
// This flag is added specifically for m114 and should be removed after
// rebasing to m120+
switches::kUserLevelMemoryPressureSignalParams,
#endif // BUILDFLAG(IS_ANDROID)
// Disable Zygote (a process fork utility); in turn needs sandbox
// disabled.
switches::kNoZygote, sandbox::policy::switches::kNoSandbox,
// Rasterize Tiles directly to GPU memory (ZeroCopyRasterBufferProvider).
blink::switches::kEnableZeroCopy,
// Enable low-end device mode. This comes with a load of memory and CPU
// saving goodies but can degrade the experience considerably. One of the
// known regressions is 4444 textures, which are then disabled explicitly.
switches::kEnableLowEndDeviceMode,
blink::switches::kDisableRGBA4444Textures,
// For Starboard the signal handlers are already setup. Disable the
// Chromium registrations to avoid overriding the Starboard ones.
switches::kDisableInProcessStackTraces,
// Cobalt doesn't use Chrome's accelerated video decoding/encoding.
switches::kDisableAcceleratedVideoDecode,
switches::kDisableAcceleratedVideoEncode,
// Disable QUIC to save CPU budgets on m114.
// Remove below if Cobalt rebase to m138+.
switches::kDisableQuic,
// Enable Blink to work in overlay video mode
switches::kForceVideoOverlays,
// Disable multiprocess mode.
switches::kSingleProcess,
// Hide content shell toolbar.
switches::kContentShellHideToolbar,
// Accelerated GL is blanket disabled for Linux. Ignore the GPU blocklist
// to enable it.
switches::kIgnoreGpuBlocklist,
// Disable Zygote (a process fork utility); in turn needs sandbox
// disabled.
switches::kNoZygote,
sandbox::policy::switches::kNoSandbox,
// Rasterize Tiles directly to GPU memory (ZeroCopyRasterBufferProvider).
blink::switches::kEnableZeroCopy,
// Enable low-end device mode. This comes with a load of memory and CPU
// saving goodies but can degrade the experience considerably. One of the
// known regressions is 4444 textures, which are then disabled explicitly.
switches::kEnableLowEndDeviceMode,
blink::switches::kDisableRGBA4444Textures,
// For Starboard the signal handlers are already setup. Disable the
// Chromium registrations to avoid overriding the Starboard ones.
switches::kDisableInProcessStackTraces,
// Cobalt doesn't use Chrome's accelerated video decoding/encoding.
switches::kDisableAcceleratedVideoDecode,
switches::kDisableAcceleratedVideoEncode,
});

// Map of switches with parameters and their defaults.
Expand Down Expand Up @@ -103,11 +96,9 @@ const base::CommandLine::SwitchMap GetCobaltParamSwitchDefaults() {
// kEnableLowEndDeviceMode sets MSAA to 4 (and not 8, the default). But
// we set it explicitly just in case.
{blink::switches::kGpuRasterizationMSAASampleCount, "4"},
// Align with MSE spec for MediaSource.duration;
// enable precise memory info so we can make accurate client-side
// Enable precise memory info so we can make accurate client-side
// measurements.
{switches::kEnableBlinkFeatures,
"MediaSourceNewAbortAndDuration, PreciseMemoryInfo"},
{switches::kEnableBlinkFeatures, "PreciseMemoryInfo"},
// Enable autoplay video/audio, as Cobalt may launch directly into media
// playback before user interaction.
{switches::kAutoplayPolicy, "no-user-gesture-required"},
Expand Down
Loading