I use the following code (in an extension) to toggle Font-Smoothing:
Code: Select all
Components.utils.import("resource://gre/modules/ctypes.jsm");
var lib = ctypes.open("user32.dll");
var boolObjFunc = function() { this.BOOL = ctypes.bool; }
var boolObj = new boolObjFunc();
var fontSmooth = lib.declare("SystemParametersInfoW", ctypes.winapi_abi, boolObj.BOOL, ctypes.unsigned_int, ctypes.unsigned_int, ctypes.voidptr_t, ctypes.unsigned_int);
var isFontSmoothOn = boolObj.BOOL();
fontSmooth(0x004A, 0, isFontSmoothOn.address(), 0); // 0x004A = SPI_GETFONTSMOOTHING.
fontSmooth(0x004B, ! isFontSmoothOn.value, ctypes.voidptr_t(0), 0); // 0x004B = SPI_SETFONTSMOOTHING.
lib.close();
If e10s and OMTC are disabled, the page's content is immediately repainted and displayed according to the new value.
If, however, OMTC is enabled, I need to manually repaint the window (i.e. minimize/restore the window, zoom-in/out etc.).
FF 48:
layers.offmainthreadcomposition.enabled (OMTC) doesn't seem to have any effect.
The page's content is not repainted regardless of its value (e10s is still disabled).
I'd appreciate your help.