summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2020-12-07 18:14:23 -0500
committerGaming4JC <g4jc@hyperbola.info>2020-12-07 18:27:55 -0500
commit03c971ab052cd5c12a0464400844465435259196 (patch)
tree58e5393daa9e0866bee686c0925e3d747c0b4c3d
parent86869ff082ea45317e16adc5781da0a18049dee8 (diff)
downloadiceweasel-uxp-03c971ab052cd5c12a0464400844465435259196.tar.gz
Backport UXP #1360 - Change Hardware Acceleration Bool so it is not inverted,
Aligns with upstream HWA changes
-rw-r--r--components/nsBrowserGlue.js15
-rw-r--r--components/preferences/in-content/advanced.js4
-rw-r--r--components/preferences/in-content/advanced.xul9
3 files changed, 20 insertions, 8 deletions
diff --git a/components/nsBrowserGlue.js b/components/nsBrowserGlue.js
index 80bde24..bc85f14 100644
--- a/components/nsBrowserGlue.js
+++ b/components/nsBrowserGlue.js
@@ -1492,7 +1492,7 @@ BrowserGlue.prototype = {
},
_migrateUI: function BG__migrateUI() {
- const UI_VERSION = 42;
+ const UI_VERSION = 43;
const BROWSER_DOCURL = "chrome://browser/content/browser.xul";
let currentUIVersion;
@@ -1820,6 +1820,19 @@ BrowserGlue.prototype = {
OS.File.remove(backupFile.path, {ignoreAbsent: true}).catch(ex => Cu.reportError(ex));
}
+ if (currentUIVersion < 43) {
+ if (Services.prefs.prefHasUserValue("layers.acceleration.disabled")) {
+ let HWADisabled = Services.prefs.getBoolPref("layers.acceleration.disabled");
+ Services.prefs.setBoolPref("layers.acceleration.enabled", !HWADisabled);
+ Services.prefs.setBoolPref("gfx.direct2d.disabled", HWADisabled);
+ }
+ if (Services.prefs.getBoolPref("layers.acceleration.force-enabled", false)) {
+ Services.prefs.setBoolPref("layers.acceleration.force", true);
+ }
+ Services.prefs.clearUserPref("layers.acceleration.disabled");
+ Services.prefs.clearUserPref("layers.acceleration.force-enabled");
+ }
+
// Update the migration version.
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
},
diff --git a/components/preferences/in-content/advanced.js b/components/preferences/in-content/advanced.js
index 0b15a45..8dd2b1d 100644
--- a/components/preferences/in-content/advanced.js
+++ b/components/preferences/in-content/advanced.js
@@ -193,9 +193,9 @@ var gAdvancedPane = {
updateHardwareAcceleration: function()
{
if (AppConstants.platform = "win") {
- var fromPref = document.getElementById("layers.acceleration.disabled");
+ var fromPref = document.getElementById("layers.acceleration.enabled");
var toPref = document.getElementById("gfx.direct2d.disabled");
- toPref.value = fromPref.value;
+ toPref.value = !fromPref.value;
}
},
diff --git a/components/preferences/in-content/advanced.xul b/components/preferences/in-content/advanced.xul
index 531442f..2f0e422 100644
--- a/components/preferences/in-content/advanced.xul
+++ b/components/preferences/in-content/advanced.xul
@@ -29,10 +29,9 @@
<preference id="general.smoothScroll"
name="general.smoothScroll"
type="bool"/>
- <preference id="layers.acceleration.disabled"
- name="layers.acceleration.disabled"
- type="bool"
- inverted="true"/>
+ <preference id="layers.acceleration.enabled"
+ name="layers.acceleration.enabled"
+ type="bool"/>
#ifdef XP_WIN
<preference id="gfx.direct2d.disabled"
name="gfx.direct2d.disabled"
@@ -149,7 +148,7 @@
<checkbox id="allowHWAccel"
label="&allowHWAccel.label;"
accesskey="&allowHWAccel.accesskey;"
- preference="layers.acceleration.disabled"/>
+ preference="layers.acceleration.enabled"/>
<checkbox id="checkSpelling"
label="&checkSpelling.label;"
accesskey="&checkSpelling.accesskey;"