From d9b99941195041c39ccac24eaaa0955940b25ef1 Mon Sep 17 00:00:00 2001 From: eyim Date: Fri, 8 Jul 2016 15:18:47 -0400 Subject: [PATCH] Bug 1285629 - Incorrect feature check for ogl on windows r=BenWa MozReview-Commit-ID: ABphm17YWnH --HG-- extra : rebase_source : d82ff2813be434f9a5ed4e8f5b17aeba228548d8 --- gfx/thebes/gfxPlatform.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp index a832a9891aa8..926ffddf4f98 100644 --- a/gfx/thebes/gfxPlatform.cpp +++ b/gfx/thebes/gfxPlatform.cpp @@ -2448,6 +2448,14 @@ gfxPlatform::BumpDeviceCounter() 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 @@ -2458,11 +2466,9 @@ 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. openGLFeature.SetDefaultFromPref( gfxPrefs::GetLayersPreferOpenGLPrefName(), - false, + true, gfxPrefs::GetLayersPreferOpenGLPrefDefault()); #else openGLFeature.EnableByDefault();