[Centaury] Align FE with HWA settings change.
This commit is contained in:
parent
7068800c17
commit
6f60f68cc0
|
@ -1648,7 +1648,7 @@ BrowserGlue.prototype = {
|
||||||
},
|
},
|
||||||
|
|
||||||
_migrateUI: function() {
|
_migrateUI: function() {
|
||||||
const UI_VERSION = 42;
|
const UI_VERSION = 43;
|
||||||
const BROWSER_DOCURL = "chrome://browser/content/browser.xul";
|
const BROWSER_DOCURL = "chrome://browser/content/browser.xul";
|
||||||
|
|
||||||
let currentUIVersion;
|
let currentUIVersion;
|
||||||
|
@ -1969,6 +1969,19 @@ BrowserGlue.prototype = {
|
||||||
OS.File.remove(backupFile.path, {ignoreAbsent: true}).catch(ex => Cu.reportError(ex));
|
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.
|
// Update the migration version.
|
||||||
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
|
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
|
||||||
},
|
},
|
||||||
|
|
|
@ -49,7 +49,7 @@ var gAdvancedPane = {
|
||||||
this.updateActualCacheSize();
|
this.updateActualCacheSize();
|
||||||
this.updateActualAppCacheSize();
|
this.updateActualAppCacheSize();
|
||||||
|
|
||||||
setEventListener("layers.acceleration.disabled", "change",
|
setEventListener("layers.acceleration.enabled", "change",
|
||||||
gAdvancedPane.updateHardwareAcceleration);
|
gAdvancedPane.updateHardwareAcceleration);
|
||||||
setEventListener("advancedPrefs", "select",
|
setEventListener("advancedPrefs", "select",
|
||||||
gAdvancedPane.tabSelectionChanged);
|
gAdvancedPane.tabSelectionChanged);
|
||||||
|
@ -217,9 +217,9 @@ var gAdvancedPane = {
|
||||||
updateHardwareAcceleration: function()
|
updateHardwareAcceleration: function()
|
||||||
{
|
{
|
||||||
if (AppConstants.platform = "win") {
|
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");
|
var toPref = document.getElementById("gfx.direct2d.disabled");
|
||||||
toPref.value = fromPref.value;
|
toPref.value = !fromPref.value;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -34,10 +34,9 @@
|
||||||
<preference id="general.smoothScroll"
|
<preference id="general.smoothScroll"
|
||||||
name="general.smoothScroll"
|
name="general.smoothScroll"
|
||||||
type="bool"/>
|
type="bool"/>
|
||||||
<preference id="layers.acceleration.disabled"
|
<preference id="layers.acceleration.enabled"
|
||||||
name="layers.acceleration.disabled"
|
name="layers.acceleration.enabled"
|
||||||
type="bool"
|
type="bool"/>
|
||||||
inverted="true"/>
|
|
||||||
#ifdef XP_WIN
|
#ifdef XP_WIN
|
||||||
<preference id="gfx.direct2d.disabled"
|
<preference id="gfx.direct2d.disabled"
|
||||||
name="gfx.direct2d.disabled"
|
name="gfx.direct2d.disabled"
|
||||||
|
@ -177,7 +176,7 @@
|
||||||
<checkbox id="allowHWAccel"
|
<checkbox id="allowHWAccel"
|
||||||
label="&allowHWAccel.label;"
|
label="&allowHWAccel.label;"
|
||||||
accesskey="&allowHWAccel.accesskey;"
|
accesskey="&allowHWAccel.accesskey;"
|
||||||
preference="layers.acceleration.disabled"/>
|
preference="layers.acceleration.enabled"/>
|
||||||
<checkbox id="checkSpelling"
|
<checkbox id="checkSpelling"
|
||||||
label="&checkSpelling.label;"
|
label="&checkSpelling.label;"
|
||||||
accesskey="&checkSpelling.accesskey;"
|
accesskey="&checkSpelling.accesskey;"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user