perf: Only show gradient blend mode if used and removed unused perf configs, b=no-bug, c=common, compact-mode, workspaces

This commit is contained in:
Mr. M
2025-06-08 12:58:10 +02:00
parent fd8a55c57c
commit 35245078c9
5 changed files with 13 additions and 25 deletions

View File

@@ -2,19 +2,6 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
// ---- Experimental settings to try make zen faster
pref("media.memory_cache_max_size", 1048576);
pref("media.cache_readahead_limit", 9000);
pref("media.cache_resume_threshold", 3600);
pref("media.memory_caches_combined_limit_kb", 2560000);
pref("image.mem.decode_bytes_at_a_time", 32768);
// Enable GPU by default
pref("gfx.canvas.accelerated", true);
pref("media.hardware-video-decoding.enabled", true);
pref("layers.gpu-process.enabled", true);
#ifdef XP_MACOSX
// Pref to control the reponse taken on macOS when the OS is under memory
// pressure. Changes to the pref take effect immediately. Browser restart not
@@ -28,14 +15,8 @@ pref("layers.gpu-process.enabled", true);
pref("browser.lowMemoryResponseMask", 3);
#endif
// Prefetching:
pref("network.dns.disablePrefetch", false);
pref("network.prefetch-next", true);
pref("network.dns.disablePrefetchFromHTTPS", false);
pref("network.predictor.enable-hover-on-ssl", true);
pref("network.http.rcwn.enabled", false);
// Experimental Zen Features
// Strategy to use for bytecode cache (Thanks https://github.com/gunir)
pref('dom.script_loader.bytecode_cache.strategy', 2);
pref("layout.css.grid-template-masonry-value.enabled", true);

View File

@@ -6,5 +6,3 @@
pref("widget.windows.mica", true);
pref("widget.windows.mica.popups", true);
pref("widget.windows.mica.toplevel-backdrop", 2);
pref("dom.ipc.processPriorityManager.backgroundUsesEcoQoS", false);

View File

@@ -78,13 +78,17 @@
transition: background-color var(--inactive-window-transition);
}
#zen-browser-grain {
content: '';
& #zen-browser-grain {
display: none;
}
:root[zen-show-grainy-background='true'] & #zen-browser-grain {
display: flex;
width: 100%;
height: 100%;
background-image: url(chrome://browser/content/zen-images/grain-bg.png);
pointer-events: none;
z-index: 0;
z-index: 1;
opacity: var(--zen-grainy-background-opacity, 0);
mix-blend-mode: overlay;
transition: opacity 0.3s ease-in-out;

View File

@@ -391,7 +391,7 @@
) {
& #zen-appcontent-navbar-container {
visibility: visible !important;
&::before {
:root[zen-show-grainy-background='true'] &::before {
content: '';
position: absolute;
top: 0;

View File

@@ -969,9 +969,14 @@
texture,
};
}
//TODO: add a better noise system that adds noise not just changes transparency
updateNoise(texture) {
document.documentElement.style.setProperty('--zen-grainy-background-opacity', texture);
document.documentElement.setAttribute(
'zen-show-grainy-background',
texture > 0 ? 'true' : 'false'
);
}
hexToRgb(hex) {