feat(graphics): default hardware_acceleration to 1 (was 0)
The earlier default of `hardware_acceleration = 0` was set "for maximum compatibility" but in practice it shipped a severely degraded experience to every user with a working GPU. Under WebKitGTK software compositing (what hardware_acceleration=0 forces via WEBKIT_DISABLE_COMPOSITING_MODE in main.rs:477) mounting any new component takes multiple seconds on 4K / tiled windows — confirmed during the 2026-05-12 perf session where the same modal that took 2-3s to open under SW comp opened instantly with HW accel on. The mitigation logic in `main.rs:482-496` already handles known-broken configs (NVIDIA-only Wayland forces compositing off; AMD/Intel/hybrid configs run with compositing enabled). With HW accel = ON as the new default, that mitigation logic actually runs — previously the nuclear "off everything" branch at `main.rs:468` was the de-facto path for every user who hadn't explicitly opted in. Schema change is non-destructive: `INSERT OR IGNORE` only seeds the row on first run, so existing users who already have a row keep their preference. Only fresh installs (and the test environment after `DELETE FROM graphics_settings`) pick up the new default. cc
This commit is contained in:
1 file changed
+11
-2
@@ -117,12 +117,21 @@ impl GraphicsSettingsStore {
|
||||
conn.execute_batch("PRAGMA journal_mode=WAL; PRAGMA synchronous=NORMAL;")
|
||||
.map_err(|e| format!("Failed to enable WAL for graphics settings database: {}", e))?;
|
||||
|
||||
// Default hardware_acceleration = 1. Earlier QBZ versions defaulted
|
||||
// to 0 "for maximum compatibility", but WebKitGTK without GPU
|
||||
// compositing is severely degraded (multi-second component mounts
|
||||
// on 4K / tiled windows; observed 2026-05-12 perf session). The
|
||||
// mitigation logic in main.rs already auto-detects NVIDIA-only
|
||||
// Wayland configs and disables compositing for them; for every
|
||||
// other config the GPU path is the better default. Users who
|
||||
// explicitly toggle off in Settings keep their preference (the
|
||||
// INSERT OR IGNORE below only seeds a row that doesn't exist).
|
||||
conn.execute_batch(
|
||||
"CREATE TABLE IF NOT EXISTS graphics_settings (
|
||||
id INTEGER PRIMARY KEY CHECK (id = 1),
|
||||
hardware_acceleration INTEGER NOT NULL DEFAULT 0
|
||||
hardware_acceleration INTEGER NOT NULL DEFAULT 1
|
||||
);
|
||||
INSERT OR IGNORE INTO graphics_settings (id, hardware_acceleration) VALUES (1, 0);",
|
||||
INSERT OR IGNORE INTO graphics_settings (id, hardware_acceleration) VALUES (1, 1);",
|
||||
)
|
||||
.map_err(|e| format!("Failed to create graphics settings table: {}", e))?;
|
||||
|
||||
|
||||
Reference in new issue
Block a user