зеркало из https://github.com/mozilla/gecko-dev.git
Bug 935672 - Only use accelerated skia on gonk. r=matt.woodrow
This commit is contained in:
Родитель
c6835f7642
Коммит
34faf80f2d
|
@ -820,8 +820,10 @@ pref("devtools.debugger.unix-domain-socket", "/data/local/debugger-socket");
|
||||||
|
|
||||||
// enable Skia/GL (OpenGL-accelerated 2D drawing) for large enough 2d canvases,
|
// enable Skia/GL (OpenGL-accelerated 2D drawing) for large enough 2d canvases,
|
||||||
// falling back to Skia/software for smaller canvases
|
// falling back to Skia/software for smaller canvases
|
||||||
|
#ifdef MOZ_WIDGET_GONK
|
||||||
pref("gfx.canvas.azure.backends", "skia");
|
pref("gfx.canvas.azure.backends", "skia");
|
||||||
pref("gfx.canvas.azure.accelerated", true);
|
pref("gfx.canvas.azure.accelerated", true);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Turn on dynamic cache size for Skia
|
// Turn on dynamic cache size for Skia
|
||||||
pref("gfx.canvas.skiagl.dynamic-cache", true);
|
pref("gfx.canvas.skiagl.dynamic-cache", true);
|
||||||
|
|
|
@ -20,7 +20,14 @@ function IsD2DEnabled() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function IsLinux() {
|
function IsLinux() {
|
||||||
return navigator.platform.indexOf("Linux") == 0 &&
|
var os = "";
|
||||||
|
|
||||||
|
try {
|
||||||
|
os = Cc["@mozilla.org/xre/app-info;1"]
|
||||||
|
.getService(SpecialPowers.Ci.nsIXULRuntime).OS;
|
||||||
|
} catch (e) {}
|
||||||
|
|
||||||
|
return os.indexOf("Linux") == 0 &&
|
||||||
navigator.appVersion.indexOf("Android") == -1;
|
navigator.appVersion.indexOf("Android") == -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче