diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp index 8c5ccbc57846..e7821cfc40e1 100644 --- a/gfx/thebes/gfxPlatform.cpp +++ b/gfx/thebes/gfxPlatform.cpp @@ -2030,7 +2030,7 @@ static bool sPrefLayersAccelerationForceEnabled = false; static bool sPrefLayersAccelerationDisabled = false; static bool sPrefLayersPreferOpenGL = false; static bool sPrefLayersPreferD3D9 = false; -static bool sLayersSupportsD3D9 = true; +static bool sLayersSupportsD3D9 = false; static int sPrefLayoutFrameRate = -1; static bool sBufferRotationEnabled = false; static bool sComponentAlphaEnabled = true; @@ -2055,15 +2055,21 @@ InitLayersAccelerationPrefs() sComponentAlphaEnabled = Preferences::GetBool("layers.componentalpha.enabled", true); sPrefBrowserTabsRemote = Preferences::GetBool("browser.tabs.remote", false); - nsCOMPtr gfxInfo = do_GetService("@mozilla.org/gfx/info;1"); - if (gfxInfo) { - int32_t status; - if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_DIRECT3D_9_LAYERS, &status))) { - if (status != nsIGfxInfo::FEATURE_NO_INFO && !sPrefLayersAccelerationForceEnabled) { - sLayersSupportsD3D9 = false; +#ifdef XP_WIN + if (sPrefLayersAccelerationForceEnabled) { + sLayersSupportsD3D9 = true; + } else { + nsCOMPtr gfxInfo = do_GetService("@mozilla.org/gfx/info;1"); + if (gfxInfo) { + int32_t status; + if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_DIRECT3D_9_LAYERS, &status))) { + if (status == nsIGfxInfo::FEATURE_NO_INFO) { + sLayersSupportsD3D9 = true; + } } } } +#endif sLayersAccelerationPrefsInitialized = true; }