Bug 1285629 - Incorrect feature check for ogl on windows
MozReview-Commit-ID: ABphm17YWnH
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -2443,31 +2443,37 @@ void
gfxPlatform::BumpDeviceCounter()
{
mDeviceCounter++;
}
void
gfxPlatform::InitOpenGLConfig()
{
+ #ifdef XP_WIN
+ // Don't enable by default on Windows, since it could show up in about:support even
+ // though it'll never get used. Only attempt if user enables the pref
+ if (!Preferences::GetBool("layers.prefer-opengl")){
+ return;
+ }
+ #endif
+
FeatureState& openGLFeature = gfxConfig::GetFeature(Feature::OPENGL_COMPOSITING);
// Check to see hw comp supported
if (!gfxConfig::IsEnabled(Feature::HW_COMPOSITING)) {
openGLFeature.DisableByDefault(FeatureStatus::Unavailable, "Hardware compositing is disabled",
NS_LITERAL_CSTRING("FEATURE_FAILURE_OPENGL_NEED_HWCOMP"));
return;
}
#ifdef XP_WIN
- // Don't enable by default on Windows, since it could show up in about:support even
- // though it'll never get used.
openGLFeature.SetDefaultFromPref(
gfxPrefs::GetLayersPreferOpenGLPrefName(),
- false,
+ true,
gfxPrefs::GetLayersPreferOpenGLPrefDefault());
#else
openGLFeature.EnableByDefault();
#endif
nsCString message;
nsCString failureId;
if (!IsGfxInfoStatusOkay(nsIGfxInfo::FEATURE_OPENGL_LAYERS, &message, failureId)) {