mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 1596248 - Add CreateContextFlags::PREFER_MULTITHREADED and change the pref name from gl to webgl. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D53768 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
240730710b
commit
fb2b04b715
@ -483,6 +483,10 @@ bool WebGLContext::CreateAndInitGL(
|
||||
flags |= gl::CreateContextFlags::FORCE_ENABLE_HARDWARE;
|
||||
}
|
||||
|
||||
if (StaticPrefs::webgl_cgl_multithreaded()) {
|
||||
flags |= gl::CreateContextFlags::PREFER_MULTITHREADED;
|
||||
}
|
||||
|
||||
if (IsWebGL2()) {
|
||||
flags |= gl::CreateContextFlags::PREFER_ES3;
|
||||
} else {
|
||||
|
@ -237,7 +237,7 @@ static already_AddRefed<GLContextCGL> CreateOffscreenFBOContext(CreateContextFla
|
||||
|
||||
RefPtr<GLContextCGL> glContext = new GLContextCGL(flags, SurfaceCaps::Any(), context, true);
|
||||
|
||||
if (StaticPrefs::gl_multithreaded()) {
|
||||
if (flags & CreateContextFlags::PREFER_MULTITHREADED) {
|
||||
CGLEnable(glContext->GetCGLContext(), kCGLCEMPEngine);
|
||||
}
|
||||
return glContext.forget();
|
||||
|
@ -44,6 +44,7 @@ enum class CreateContextFlags : uint16_t {
|
||||
HIGH_POWER = 1 << 6,
|
||||
PROVOKING_VERTEX_DONT_CARE = 1 << 7,
|
||||
PREFER_EXACT_VERSION = 1 << 8,
|
||||
PREFER_MULTITHREADED = 1 << 9,
|
||||
};
|
||||
MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(CreateContextFlags)
|
||||
|
||||
|
@ -3713,13 +3713,6 @@
|
||||
value: false
|
||||
mirror: always
|
||||
|
||||
#if defined(XP_MACOSX)
|
||||
- name: gl.multithreaded
|
||||
type: RelaxedAtomicBool
|
||||
value: true
|
||||
mirror: always
|
||||
#endif
|
||||
|
||||
- name: gl.use-tls-is-current
|
||||
type: RelaxedAtomicInt32
|
||||
value: 0
|
||||
@ -7582,7 +7575,6 @@
|
||||
#endif
|
||||
mirror: always
|
||||
|
||||
|
||||
- name: webgl.all-angle-options
|
||||
type: RelaxedAtomicBool
|
||||
value: false
|
||||
@ -7612,6 +7604,11 @@
|
||||
value: true
|
||||
mirror: always
|
||||
|
||||
- name: webgl.cgl.multithreaded
|
||||
type: RelaxedAtomicBool
|
||||
value: true
|
||||
mirror: always
|
||||
|
||||
- name: webgl.default-antialias
|
||||
type: RelaxedAtomicBool
|
||||
value: @IS_NOT_ANDROID@
|
||||
|
Loading…
Reference in New Issue
Block a user