mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 937204 - 1/3. Simplify the D3D9_LAYERS gfxinfo check and only run it on Windows - r=jrmuizel
This commit is contained in:
parent
f51c3ef95e
commit
5425966dac
@ -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<nsIGfxInfo> 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<nsIGfxInfo> 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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user