Bug 1223540 - Add a pref for CGL's multithreaded mode (EMPEngine). r=jrmuizel

This commit is contained in:
Benoit Girard 2015-11-10 16:14:24 -05:00
parent 9c52a83c05
commit d79033e045
3 changed files with 11 additions and 0 deletions

View File

@ -15,6 +15,8 @@
#include "GeckoProfiler.h"
#include "mozilla/gfx/MacIOSurface.h"
#include <OpenGL/OpenGL.h>
namespace mozilla {
namespace gl {
@ -296,6 +298,9 @@ CreateOffscreenFBOContext(CreateContextFlags flags)
RefPtr<GLContextCGL> glContext = new GLContextCGL(dummyCaps, context,
true, profile);
if (gfxPrefs::GLMultithreaded()) {
CGLEnable(glContext->GetCGLContext(), kCGLCEMPEngine);
}
return glContext.forget();
}

View File

@ -270,6 +270,9 @@ private:
DECL_GFX_PREF(Once, "gfx.screen-mirroring.enabled", ScreenMirroringEnabled, bool, false);
DECL_GFX_PREF(Live, "gl.msaa-level", MSAALevel, uint32_t, 2);
#if defined(XP_MACOSX)
DECL_GFX_PREF(Live, "gl.multithreaded", GLMultithreaded, bool, false);
#endif
DECL_GFX_PREF(Live, "gl.require-hardware", RequireHardwareGL, bool, false);
DECL_GFX_PREF(Once, "image.cache.size", ImageCacheSize, int32_t, 5*1024*1024);

View File

@ -4170,6 +4170,9 @@ pref("gl.msaa-level", 0);
pref("gl.msaa-level", 2);
#endif
pref("gl.require-hardware", false);
#ifdef XP_MACOSX
pref("gl.multithreaded", false);
#endif
pref("webgl.force-enabled", false);
pref("webgl.disabled", false);