mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-16 06:46:12 +00:00
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:
@@ -2,19 +2,6 @@
|
|||||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
// 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/.
|
// 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
|
#ifdef XP_MACOSX
|
||||||
// Pref to control the reponse taken on macOS when the OS is under memory
|
// 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
|
// 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);
|
pref("browser.lowMemoryResponseMask", 3);
|
||||||
#endif
|
#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.predictor.enable-hover-on-ssl", true);
|
||||||
pref("network.http.rcwn.enabled", false);
|
|
||||||
|
|
||||||
// Experimental Zen Features
|
// Experimental Zen Features
|
||||||
// Strategy to use for bytecode cache (Thanks https://github.com/gunir)
|
// Strategy to use for bytecode cache (Thanks https://github.com/gunir)
|
||||||
pref('dom.script_loader.bytecode_cache.strategy', 2);
|
pref('dom.script_loader.bytecode_cache.strategy', 2);
|
||||||
pref("layout.css.grid-template-masonry-value.enabled", true);
|
|
||||||
|
@@ -6,5 +6,3 @@
|
|||||||
pref("widget.windows.mica", true);
|
pref("widget.windows.mica", true);
|
||||||
pref("widget.windows.mica.popups", true);
|
pref("widget.windows.mica.popups", true);
|
||||||
pref("widget.windows.mica.toplevel-backdrop", 2);
|
pref("widget.windows.mica.toplevel-backdrop", 2);
|
||||||
|
|
||||||
pref("dom.ipc.processPriorityManager.backgroundUsesEcoQoS", false);
|
|
||||||
|
@@ -78,13 +78,17 @@
|
|||||||
transition: background-color var(--inactive-window-transition);
|
transition: background-color var(--inactive-window-transition);
|
||||||
}
|
}
|
||||||
|
|
||||||
#zen-browser-grain {
|
& #zen-browser-grain {
|
||||||
content: '';
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
:root[zen-show-grainy-background='true'] & #zen-browser-grain {
|
||||||
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-image: url(chrome://browser/content/zen-images/grain-bg.png);
|
background-image: url(chrome://browser/content/zen-images/grain-bg.png);
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
z-index: 0;
|
z-index: 1;
|
||||||
opacity: var(--zen-grainy-background-opacity, 0);
|
opacity: var(--zen-grainy-background-opacity, 0);
|
||||||
mix-blend-mode: overlay;
|
mix-blend-mode: overlay;
|
||||||
transition: opacity 0.3s ease-in-out;
|
transition: opacity 0.3s ease-in-out;
|
||||||
|
@@ -391,7 +391,7 @@
|
|||||||
) {
|
) {
|
||||||
& #zen-appcontent-navbar-container {
|
& #zen-appcontent-navbar-container {
|
||||||
visibility: visible !important;
|
visibility: visible !important;
|
||||||
&::before {
|
:root[zen-show-grainy-background='true'] &::before {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
@@ -969,9 +969,14 @@
|
|||||||
texture,
|
texture,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: add a better noise system that adds noise not just changes transparency
|
//TODO: add a better noise system that adds noise not just changes transparency
|
||||||
updateNoise(texture) {
|
updateNoise(texture) {
|
||||||
document.documentElement.style.setProperty('--zen-grainy-background-opacity', texture);
|
document.documentElement.style.setProperty('--zen-grainy-background-opacity', texture);
|
||||||
|
document.documentElement.setAttribute(
|
||||||
|
'zen-show-grainy-background',
|
||||||
|
texture > 0 ? 'true' : 'false'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
hexToRgb(hex) {
|
hexToRgb(hex) {
|
||||||
|
Reference in New Issue
Block a user