зеркало из https://github.com/mozilla/gecko-dev.git
Move AL configuration code to a separate function. (bug 1377866 part 1, r=jrmuizel)
This commit is contained in:
Родитель
fa09d4e240
Коммит
de0153ddb7
|
@ -1387,25 +1387,32 @@ gfxWindowsPlatform::InitializeD3D11Config()
|
|||
d3d11.UserForceEnable("User force-enabled WARP");
|
||||
}
|
||||
|
||||
InitializeAdvancedLayersConfig();
|
||||
}
|
||||
|
||||
/* static */ void
|
||||
gfxWindowsPlatform::InitializeAdvancedLayersConfig()
|
||||
{
|
||||
// Only enable Advanced Layers if D3D11 succeeded.
|
||||
if (d3d11.IsEnabled()) {
|
||||
FeatureState& al = gfxConfig::GetFeature(Feature::ADVANCED_LAYERS);
|
||||
if (!gfxConfig::IsEnabled(Feature::D3D11_COMPOSITING)) {
|
||||
return;
|
||||
}
|
||||
|
||||
al.SetDefaultFromPref(
|
||||
gfxPrefs::GetAdvancedLayersEnabledDoNotUseDirectlyPrefName(),
|
||||
true /* aIsEnablePref */,
|
||||
gfxPrefs::GetAdvancedLayersEnabledDoNotUseDirectlyPrefDefault());
|
||||
FeatureState& al = gfxConfig::GetFeature(Feature::ADVANCED_LAYERS);
|
||||
al.SetDefaultFromPref(
|
||||
gfxPrefs::GetAdvancedLayersEnabledDoNotUseDirectlyPrefName(),
|
||||
true /* aIsEnablePref */,
|
||||
gfxPrefs::GetAdvancedLayersEnabledDoNotUseDirectlyPrefDefault());
|
||||
|
||||
// Windows 7 has an extra pref since it uses totally different buffer paths
|
||||
// that haven't been performance tested yet.
|
||||
if (al.IsEnabled() && !IsWin8OrLater()) {
|
||||
if (gfxPrefs::AdvancedLayersEnableOnWindows7()) {
|
||||
al.UserEnable("Enabled for Windows 7 via user-preference");
|
||||
} else {
|
||||
al.Disable(FeatureStatus::Disabled,
|
||||
"Advanced Layers is disabled on Windows 7 by default",
|
||||
NS_LITERAL_CSTRING("FEATURE_FAILURE_DISABLED_ON_WIN7"));
|
||||
}
|
||||
// Windows 7 has an extra pref since it uses totally different buffer paths
|
||||
// that haven't been performance tested yet.
|
||||
if (al.IsEnabled() && !IsWin8OrLater()) {
|
||||
if (gfxPrefs::AdvancedLayersEnableOnWindows7()) {
|
||||
al.UserEnable("Enabled for Windows 7 via user-preference");
|
||||
} else {
|
||||
al.Disable(FeatureStatus::Disabled,
|
||||
"Advanced Layers is disabled on Windows 7 by default",
|
||||
NS_LITERAL_CSTRING("FEATURE_FAILURE_DISABLED_ON_WIN7"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -258,6 +258,7 @@ private:
|
|||
void InitializeD3D11Config();
|
||||
void InitializeD2DConfig();
|
||||
void InitializeDirectDrawConfig();
|
||||
void InitializeAdvancedLayersConfig();
|
||||
|
||||
RefPtr<IDWriteFactory> mDWriteFactory;
|
||||
RefPtr<IDWriteRenderingParams> mRenderingParams[TEXT_RENDERING_COUNT];
|
||||
|
|
Загрузка…
Ссылка в новой задаче