Bug 925530 - Disable WebGL antialiasing on Mobile by default. - r=kamidphish,vlad

* * *
Bug 925530 - Add missing include. - r=bustage on a CLOSED TREE
This commit is contained in:
Jeff Gilbert 2014-07-03 16:09:04 -07:00
parent 6444266726
commit bf448f971f
2 changed files with 11 additions and 0 deletions

View File

@ -31,6 +31,7 @@
#include "gfxContext.h"
#include "gfxPattern.h"
#include "gfxPrefs.h"
#include "gfxUtils.h"
#include "CanvasUtils.h"
@ -437,6 +438,11 @@ WebGLContext::SetContextOptions(JSContext* aCx, JS::Handle<JS::Value> aOptions)
// enforce that if stencil is specified, we also give back depth
newOpts.depth |= newOpts.stencil;
// Don't do antialiasing if we've disabled MSAA.
if (!gfxPrefs::MSAALevel()) {
newOpts.antialias = false;
}
#if 0
GenerateWarning("aaHint: %d stencil: %d depth: %d alpha: %d premult: %d preserve: %d\n",
newOpts.antialias ? 1 : 0,

View File

@ -3702,7 +3702,12 @@ pref("canvas.image.cache.limit", 0);
pref("image.onload.decode.limit", 0);
// WebGL prefs
#ifdef ANDROID
// Disable MSAA on mobile.
pref("gl.msaa-level", 0);
#else
pref("gl.msaa-level", 2);
#endif
pref("webgl.force-enabled", false);
pref("webgl.disabled", false);
pref("webgl.shader_validator", true);