Fix assertion failure in gfxConfig. (bug 1269565, r=milan)

--HG--
extra : rebase_source : 699112ba0801ea3418b1582b59524f55af21d5cd
This commit is contained in:
David Anderson 2016-05-03 14:53:52 -04:00
Родитель 286ddca5f8
Коммит 0499cd8b51
2 изменённых файлов: 8 добавлений и 6 удалений

Просмотреть файл

@ -17,8 +17,8 @@ enum class FeatureStatus
// This feature has not been requested.
Unused,
// This feature is unavailable due to Safe Mode or not being included with
// the operating system.
// This feature is unavailable due to Safe Mode, not being included with
// the operating system, or a dependent feature being disabled.
Unavailable,
// This feature crashed immediately when we tried to initialize it, but we

Просмотреть файл

@ -1957,6 +1957,11 @@ gfxWindowsPlatform::InitializeD3D11Config()
FeatureState& d3d11 = gfxConfig::GetFeature(Feature::D3D11_COMPOSITING);
if (!gfxConfig::IsEnabled(Feature::HW_COMPOSITING)) {
d3d11.DisableByDefault(FeatureStatus::Unavailable, "Hardware compositing is disabled");
return;
}
d3d11.EnableByDefault();
// If the user prefers D3D9, act as though they disabled D3D11.
@ -2297,10 +2302,7 @@ gfxWindowsPlatform::InitializeDevices()
UpdateDeviceInitData();
// If acceleration is disabled, we refuse to initialize anything.
FeatureStatus compositing = gfxConfig::GetValue(Feature::HW_COMPOSITING);
if (IsFeatureStatusFailure(compositing)) {
gfxConfig::DisableByDefault(Feature::D3D11_COMPOSITING, compositing, "Hardware compositing is disabled");
gfxConfig::DisableByDefault(Feature::DIRECT2D, compositing, "Hardware compositing is disabled");
if (!gfxConfig::IsEnabled(Feature::HW_COMPOSITING)) {
return;
}