Bug 594173. "Advanced > Use hardware acceleration when available" needs to control layers.accelerate-none pref (and also gfx.direct2d.disabled on Windows). r=mano a=blocking-beta6

This commit is contained in:
Felipe Gomes
2010-09-10 15:42:15 -03:00
parent 2081a4bc37
commit bd1ae914d9
2 changed files with 15 additions and 6 deletions

View File

@@ -39,6 +39,7 @@
// Load DownloadUtils module for convertByteUnits
Components.utils.import("resource://gre/modules/DownloadUtils.jsm");
Components.utils.import("resource://gre/modules/Services.jsm");
var gAdvancedPane = {
_inited: false,
@@ -171,6 +172,17 @@ var gAdvancedPane = {
} catch (e) { }
},
/**
* When the user toggles the layers.accelerate-none pref,
* sync its new value to the gfx.direct2d.disabled pref too.
*/
updateHardwareAcceleration: function()
{
#ifdef XP_WIN
var pref = document.getElementById("layers.accelerate-none");
Services.prefs.setBoolPref("gfx.direct2d.disabled", !pref.value);
#endif
},
// NETWORK TAB