summaryrefslogtreecommitdiffstats
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
commit068372c618726edc5eb1a519c99fe438fbcbe944 (patch)
tree301fe19c18fba8ca5645f8e6a97c6f5fda48b08e /modules
parenta1cce3b2b00bbd9f4983013ddd8934a7bccb9e99 (diff)
downloadUXP-068372c618726edc5eb1a519c99fe438fbcbe944.tar
UXP-068372c618726edc5eb1a519c99fe438fbcbe944.tar.gz
UXP-068372c618726edc5eb1a519c99fe438fbcbe944.tar.lz
UXP-068372c618726edc5eb1a519c99fe438fbcbe944.tar.xz
UXP-068372c618726edc5eb1a519c99fe438fbcbe944.zip
Issue #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 c5daf9213..ada4dbc5f 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