feat: add vaapi performance mode

This commit is contained in:
smartfrigde 2024-04-30 09:36:05 +02:00
parent 78ec14be6d
commit 3a78532001
3 changed files with 4 additions and 1 deletions

View file

@ -53,6 +53,7 @@
"settings-prfmMode-desc": "Performance mode is an experimental function that may either increase responsiveness and performance of\n ArmCord or… decrease it. Please try every option and see which fits you the best.",
"settings-prfmMode-performance": "Performance",
"settings-prfmMode-battery": "Battery",
"settings-prfmMode-vaapi": "VAAPI",
"settings-disableAutogain": "Disable autogain",
"settings-disableAutogain-desc": "Disables autogain.",
"settings-trayIcon": "Tray icon",

View file

@ -169,6 +169,7 @@
<option value="none" data-string="settings-none" selected></option>
<option value="performance" data-string="settings-prfmMode-performance"></option>
<option value="battery" data-string="settings-prfmMode-battery"></option>
<option value="vaapi" data-string="settings-prfmMode-vaapi"></option>
</select>
<p class="header" data-string="settings-prfmMode"></p>

View file

@ -133,7 +133,8 @@ export async function injectElectronFlags(): Promise<void> {
// SOFTWARE.
const presets = {
performance: `--enable-gpu-rasterization --enable-zero-copy --ignore-gpu-blocklist --enable-hardware-overlays=single-fullscreen,single-on-top,underlay --enable-features=EnableDrDc,CanvasOopRasterization,BackForwardCache:TimeToLiveInBackForwardCacheInSeconds/300/should_ignore_blocklists/true/enable_same_site/true,ThrottleDisplayNoneAndVisibilityHiddenCrossOriginIframes,UseSkiaRenderer,WebAssemblyLazyCompilation --disable-features=Vulkan --force_high_performance_gpu`, // Performance
battery: "--enable-features=TurnOffStreamingMediaCachingOnBattery --force_low_power_gpu" // Known to have better battery life for Chromium?
battery: "--enable-features=TurnOffStreamingMediaCachingOnBattery --force_low_power_gpu", // Known to have better battery life for Chromium?
vaapi: "--ignore-gpu-blocklist --enable-features=VaapiVideoDecoder --enable-gpu-rasterization --enable-zero-copy --force_high_performance_gpu --use-gl=desktop --disable-features=UseChromeOSDirectVideoDecoder"
};
switch (await getConfig("performanceMode")) {
case "performance":