Bug 1561491 - Make gl.* static prefs follow the naming convention. r=KrisWright

Differential Revision: https://phabricator.services.mozilla.com/D35976

--HG--
extra : rebase_source : 0e054c5ac565d30c3bd9621d82d41075bdfddd5b
This commit is contained in:
Nicholas Nethercote 2019-06-26 13:05:06 +10:00
Родитель ca8e78069d
Коммит 54aaa29a52
5 изменённых файлов: 16 добавлений и 15 удалений

Просмотреть файл

@ -208,9 +208,11 @@ static const char* const sExtensionNames[] = {
"GL_OVR_multiview2"};
static bool ShouldUseTLSIsCurrent(bool useTLSIsCurrent) {
if (StaticPrefs::UseTLSIsCurrent() == 0) return useTLSIsCurrent;
if (StaticPrefs::gl_use_tls_is_current() == 0) {
return useTLSIsCurrent;
}
return StaticPrefs::UseTLSIsCurrent() > 0;
return StaticPrefs::gl_use_tls_is_current() > 0;
}
static bool ParseVersion(const std::string& versionStr,

Просмотреть файл

@ -226,7 +226,7 @@ static already_AddRefed<GLContextCGL> CreateOffscreenFBOContext(CreateContextFla
std::vector<NSOpenGLPixelFormatAttribute> attribs;
if (!StaticPrefs::GLAllowHighPower()) {
if (!StaticPrefs::gl_allow_high_power()) {
flags &= ~CreateContextFlags::HIGH_POWER;
}
if (flags & CreateContextFlags::ALLOW_OFFLINE_RENDERER ||
@ -236,7 +236,7 @@ static already_AddRefed<GLContextCGL> CreateOffscreenFBOContext(CreateContextFla
attribs.push_back(NSOpenGLPFAAllowOfflineRenderers);
}
if (StaticPrefs::RequireHardwareGL()) {
if (StaticPrefs::gl_require_hardware()) {
attribs.push_back(NSOpenGLPFAAccelerated);
}
@ -260,7 +260,7 @@ static already_AddRefed<GLContextCGL> CreateOffscreenFBOContext(CreateContextFla
RefPtr<GLContextCGL> glContext = new GLContextCGL(flags, SurfaceCaps::Any(), context, true);
if (StaticPrefs::GLMultithreaded()) {
if (StaticPrefs::gl_multithreaded()) {
CGLEnable(glContext->GetCGLContext(), kCGLCEMPEngine);
}
return glContext.forget();

Просмотреть файл

@ -215,7 +215,7 @@ bool WGLLibrary::EnsureInitialized() {
bool hasDXInterop2 = HasExtension(extString, "WGL_NV_DX_interop2");
if (gfxVars::DXInterop2Blocked() &&
!StaticPrefs::IgnoreDXInterop2Blacklist()) {
!StaticPrefs::gl_ignore_dx_interop2_blacklist()) {
hasDXInterop2 = false;
}

Просмотреть файл

@ -291,14 +291,13 @@ void ScaleYCbCrToRGB32(const uint8* y_buf,
YUVType yuv_type,
YUVColorSpace yuv_color_space,
ScaleFilter filter) {
bool use_deprecated =
StaticPrefs::gfx_ycbcr_accurate_conversion() ||
#if defined(XP_WIN) && defined(_M_X64)
// libyuv does not support SIMD scaling on win 64bit. See Bug 1295927.
supports_sse3() ||
// libyuv does not support SIMD scaling on win 64bit. See Bug 1295927.
supports_sse3() ||
#endif
(supports_mmx() && supports_sse() && !supports_sse3());
(supports_mmx() && supports_sse() && !supports_sse3());
// The deprecated function only support BT601.
// See Bug 1210357.
if (yuv_color_space != YUVColorSpace::BT601) {

Просмотреть файл

@ -3517,14 +3517,14 @@ VARCACHE_PREF(
VARCACHE_PREF(
Live,
"gl.allow-high-power",
GLAllowHighPower,
gl_allow_high_power,
RelaxedAtomicBool, true
)
VARCACHE_PREF(
Live,
"gl.ignore-dx-interop2-blacklist",
IgnoreDXInterop2Blacklist,
gl_ignore_dx_interop2_blacklist,
RelaxedAtomicBool, false
)
@ -3532,7 +3532,7 @@ VARCACHE_PREF(
VARCACHE_PREF(
Live,
"gl.multithreaded",
GLMultithreaded,
gl_multithreaded,
RelaxedAtomicBool, false
)
#endif
@ -3540,14 +3540,14 @@ VARCACHE_PREF(
VARCACHE_PREF(
Live,
"gl.require-hardware",
RequireHardwareGL,
gl_require_hardware,
RelaxedAtomicBool, false
)
VARCACHE_PREF(
Live,
"gl.use-tls-is-current",
UseTLSIsCurrent,
gl_use_tls_is_current,
RelaxedAtomicInt32, 0
)