add flags

This commit is contained in:
Alexander Frick 2023-03-02 03:48:59 -06:00
parent 171f60482e
commit 4ccc417298
4 changed files with 43 additions and 24 deletions

View file

@ -1,5 +1,5 @@
#!/usr/bin/env python3
# Copyright 2022 The Chromium Authors and Alex313031. All rights reserved.
# Copyright 2023 The Chromium Authors and Alex313031. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

View file

@ -1,4 +1,4 @@
// Copyright (c) 2022 Alex313031. All rights reserved.
// Copyright (c) 2023 Alex313031. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@ -78,6 +78,18 @@ const FeatureEntry::Choice kNumRasterThreadsChoices[] = {
blink::switches::kNumRasterThreads, "4"},
};
const FeatureEntry::Choice kForceGpuMemAvailableMbChoices[] = {
{flags_ui::kGenericExperimentChoiceDefault, "", ""},
{"128",
"force-gpu-mem-available-mb", "128"},
{"256",
"force-gpu-mem-available-mb", "256"},
{"512",
"force-gpu-mem-available-mb", "512"},
{"1024",
"force-gpu-mem-available-mb", "1024"},
};
#if BUILDFLAG(IS_LINUX)
const FeatureEntry::Choice kPasswordStoreChoices[] = {
{flags_ui::kGenericExperimentChoiceDefault, "", ""},

View file

@ -9,6 +9,14 @@
"Enable Dark Mode",
"Enables dark mode for all Thorium instances.",
kOsDesktop, SINGLE_VALUE_TYPE(switches::kForceDarkMode)},
#if BUILDFLAG(IS_LINUX)
{"auto-dark-mode",
"GTK Auto Dark Mode",
"Enables Thorium to automatically change to Dark Mode according to the system GTK Theme.",
kOsLinux, SINGLE_VALUE_TYPE("auto-dark-mode")},
#endif // BUILDFLAG(IS_LINUX)
{"force-high-contrast",
"Enable High Contrast Mode",
"Enables high contrast mode for all Thorium instances.",
@ -49,6 +57,14 @@
"Enable Native UI Inspection in DevTools",
"Enables inspection of native UI elements in devtools. Inspect at `chrome://inspect/#native-ui`",
kOsDesktop, SINGLE_VALUE_TYPE(ui_devtools::switches::kEnableUiDevTools)},
{"double-click-close-tab",
"Double Click to Close Tab",
"Enables double clicking a tab to close it.",
kOsDesktop, SINGLE_VALUE_TYPE("double-click-close-tab")},
{"show-fps-counter",
"Show FPS Counter",
"Draws a heads-up-display showing Frames Per Second as well as GPU memory usage.",
kOsDesktop, SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter)},
{"disable-webgl2",
"Disable WebGL 2",
"Disable WebGL 2. Useful for certain GPU/OS combinations.",
@ -65,30 +81,22 @@
"Disable Web Security",
"Don't enforce the same-origin policy; meant for website testing only. See `https://web.dev/same-origin-policy/`",
kOsDesktop, SINGLE_VALUE_TYPE(switches::kDisableWebSecurity)},
{"double-click-close-tab",
"Double Click to Close Tab",
"Enables double clicking a tab to close it.",
kOsDesktop, SINGLE_VALUE_TYPE("double-click-close-tab")},
{"show-fps-counter",
"Show FPS Counter",
"Draws a heads-up-display showing Frames Per Second as well as GPU memory usage.",
kOsDesktop, SINGLE_VALUE_TYPE("show-fps-counter")},
{"force-gpu-mem-available-mb",
"Set GPU Available Memory",
"Sets the total amount of memory (in MB) that may be allocated for GPU resources.",
kOsDesktop, MULTI_VALUE_TYPE(kForceGpuMemAvailableMbChoices)},
#if BUILDFLAG(IS_LINUX)
{"enable-native-gpu-memory-buffers",
"Enable Native GPU Memory Buffers",
"Enables native CPU-mappable GPU memory buffer support on Linux.",
kOsLinux, SINGLE_VALUE_TYPE(switches::kEnableNativeGpuMemoryBuffers)},
{"password-store",
"Password Store Backend",
"Choose the password store backend, instead of using the automatically detected one. "
"Sometimes the default detected backend is incorrect, or you would want `Basic`, "
"instead of the platform provided password stores on Linux. (i.e. for portable usage.)",
kOsLinux, MULTI_VALUE_TYPE(kPasswordStoreChoices)},
{"auto-dark-mode",
"GTK Auto Dark Mode",
"Enables Thorium to automatically change to Dark Mode according to the system GTK Theme.",
kOsLinux, SINGLE_VALUE_TYPE("auto-dark-mode")},
{"enable-native-gpu-memory-buffers",
"Enable Native GPU Memory Buffers",
"Enables native CPU-mappable GPU memory buffer support on Linux.",
kOsLinux, SINGLE_VALUE_TYPE("enable-native-gpu-memory-buffers")},
#endif // BUILDFLAG(IS_LINUX)
#if BUILDFLAG(IS_WIN)
@ -98,7 +106,8 @@
kOsWin, SINGLE_VALUE_TYPE(switches::kDisableWindows10CustomTitlebar)},
{"enable-exclusive-audio",
"Enable Exclusive Audio Streams",
"Use exclusive mode audio streaming for Windows Vista and higher. Leads to lower latencies for audio streams which use the AudioParameters::AUDIO_PCM_LOW_LATENCY audio path. See https://docs.microsoft.com/en-us/windows/win32/coreaudio/exclusive-mode-streams for details.",
"Use exclusive mode audio streaming for Windows Vista and higher. Leads to lower latencies for audio streams which use the AudioParameters::AUDIO_PCM_LOW_LATENCY audio path. "
"See https://docs.microsoft.com/en-us/windows/win32/coreaudio/exclusive-mode-streams for details.",
kOsWin, SINGLE_VALUE_TYPE(switches::kEnableExclusiveAudio)},
#endif // BUILDFLAG(IS_WIN)

View file

@ -1253,11 +1253,9 @@ config("toolchain") {
ldflags += [ "/STACK:2097152" ]
}
if (is_linux) {
# Increase the initial stack size. The default is 1MB, this is 2MB. This
# applies only to executables and shared libraries produced by V8 since
# ldflags are not pushed to dependants.
cflags += [ "-O3 -mavx -maes" ]
ldflags += [ "-Wl,-O3 -mavx -maes" ]
# Full optimization for V8.
cflags += [ "-O3", "-mavx", "-maes" ]
ldflags += [ "-Wl,-O3", "-mavx", "-maes" ]
}
}
if (is_android && v8_android_log_stdout) {