Skip to content

Commit

Permalink
feat: add vaapi performance mode
Browse files Browse the repository at this point in the history
  • Loading branch information
smartfrigde committed Apr 30, 2024
1 parent 78ec14b commit 3a78532
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions assets/lang/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions src/settings/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
3 changes: 2 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down

0 comments on commit 3a78532

Please sign in to comment.