summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2020-01-25 21:26:24 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 12:14:11 +0200
commitfd9e3cd86da8af574b985a211a6ed1e1452a9b72 (patch)
tree301fe19c18fba8ca5645f8e6a97c6f5fda48b08e /modules
parentd1e7dd77398e99240409407aec748d9ad29c116a (diff)
downloaduxp-fd9e3cd86da8af574b985a211a6ed1e1452a9b72.tar.gz
Issue mcp-graveyard/UXP#1360 - Part 1: Simplify layers acceleration prefs.
This gets rid of platform-dependent hard-coded defaults, but keeps build-time blocking if there is no GL provider (in which case layers acceleration almost certainly won't work because it needs a GL compositor and would likely crash without) New prefs are - layers.acceleration.enabled to enable HWA - layers.acceleration.force to force it enabled (requires .enabled to be set as well) This is the platform part of this issue. The rest will be front-end work (Preference UI integration and pref migration)
Diffstat (limited to 'modules')
-rw-r--r--modules/libpref/init/all.js23
1 files changed, 10 insertions, 13 deletions
diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
index c5daf92131..ada4dbc5f6 100644
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -4497,7 +4497,16 @@ pref("network.tcp.keepalive.probe_count", 4);
#endif
// Whether to disable acceleration for all widgets.
-pref("layers.acceleration.disabled", false);
+#if defined(XP_UNIX) && !defined(XP_MACOSX)
+// On Linux this is disabled by default for known issues with "free" drivers
+pref("layers.acceleration.enabled", false);
+#else
+pref("layers.acceleration.enabled", true);
+#endif
+// Whether to force acceleration on, ignoring blacklists.
+// This requires layers.acceleration.enabled to be set to true
+pref("layers.acceleration.force", false);
+
// Preference that when switched at runtime will run a series of benchmarks
// and output the result to stderr.
pref("layers.bench.enabled", false);
@@ -4506,18 +4515,6 @@ pref("layers.bench.enabled", false);
pref("layers.gpu-process.dev.enabled", true);
#endif
-// Whether to force acceleration on, ignoring blacklists.
-#ifdef ANDROID
-// bug 838603 -- on Android, accidentally blacklisting OpenGL layers
-// means a startup crash for everyone.
-// Temporarily force-enable GL compositing. This is default-disabled
-// deep within the bowels of the widgetry system. Remove me when GL
-// compositing isn't default disabled in widget/android.
-pref("layers.acceleration.force-enabled", true);
-#else
-pref("layers.acceleration.force-enabled", false);
-#endif
-
pref("layers.acceleration.draw-fps", false);
// Enable DEAA antialiasing for transformed layers in the compositor