Bug 1455696: gfx.webrender.all.qualified preference to default to WR for non-blocked devices/hardware. gfx.webrender.all will still force it on. r=milan

--HG--
extra : rebase_source : 173f06f702ccc4eb93d0e4533316056cb07c88af
This commit is contained in:
Milan Sreckovic 2018-05-03 13:02:00 +03:00
Родитель caa85b9b9e
Коммит 4712274b69
7 изменённых файлов: 66 добавлений и 3 удалений

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

@ -2526,9 +2526,23 @@ gfxPlatform::InitWebRenderConfig()
NS_LITERAL_CSTRING("FEATURE_FAILURE_DEFAULT_OFF"));
if (prefEnabled) {
featureWebRender.UserEnable("Enabled by pref");
featureWebRender.UserEnable("Force enabled by pref");
} else if (WebRenderEnvvarEnabled()) {
featureWebRender.UserEnable("Enabled by envvar");
featureWebRender.UserEnable("Force enabled by envvar");
} else if (gfxPrefs::WebRenderAllQualified()) {
nsCOMPtr<nsIGfxInfo> gfxInfo = services::GetGfxInfo();
nsCString discardFailureId;
int32_t status;
if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_WEBRENDER,
discardFailureId, &status))) {
if (status == nsIGfxInfo::FEATURE_STATUS_OK) {
featureWebRender.UserEnable("Qualified enabled by pref ");
} else {
featureWebRender.ForceDisable(FeatureStatus::Blocked,
"Qualified enable blocked",
discardFailureId);
}
}
}
// HW_COMPOSITING being disabled implies interfacing with the GPU might break

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

@ -511,6 +511,7 @@ private:
DECL_GFX_PREF(Once, "gfx.vsync.compositor.unobserve-count", CompositorUnobserveCount, int32_t, 10);
DECL_GFX_PREF(Once, "gfx.webrender.all", WebRenderAll, bool, false);
DECL_GFX_PREF(Once, "gfx.webrender.all.qualified", WebRenderAllQualified, bool, false);
DECL_OVERRIDE_PREF(Once, "gfx.webrender.async-scene-build", WebRenderAsyncSceneBuild, gfxPrefs::WebRenderAll());
DECL_GFX_PREF(Once, "gfx.webrender.enabled", WebRenderEnabledDoNotUseDirectly, bool, false);
DECL_GFX_PREF(Live, "gfx.webrender.blob-images", WebRenderBlobImages, bool, true);

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

@ -174,6 +174,9 @@ GetPrefNameForFeature(int32_t aFeature)
case nsIGfxInfo::FEATURE_D3D11_KEYED_MUTEX:
name = BLACKLIST_PREF_BRANCH "d3d11.keyed.mutex";
break;
case nsIGfxInfo::FEATURE_WEBRENDER:
name = BLACKLIST_PREF_BRANCH "webrender";
break;
case nsIGfxInfo::FEATURE_VP8_HW_DECODE:
case nsIGfxInfo::FEATURE_VP9_HW_DECODE:
// We don't provide prefs for these features as these are
@ -364,6 +367,8 @@ BlacklistFeatureToGfxFeature(const nsAString& aFeature)
return nsIGfxInfo::FEATURE_ADVANCED_LAYERS;
else if (aFeature.EqualsLiteral("D3D11_KEYED_MUTEX"))
return nsIGfxInfo::FEATURE_D3D11_KEYED_MUTEX;
else if (aFeature.EqualsLiteral("WEBRENDER"))
return nsIGfxInfo::FEATURE_WEBRENDER;
// We do not support FEATURE_VP8_HW_DECODE and FEATURE_VP9_HW_DECODE
// in downloadable blocklist.
@ -993,6 +998,7 @@ GfxInfoBase::EvaluateDownloadedBlacklist(nsTArray<GfxDriverInfo>& aDriverInfo)
nsIGfxInfo::FEATURE_WEBGL2,
nsIGfxInfo::FEATURE_ADVANCED_LAYERS,
nsIGfxInfo::FEATURE_D3D11_KEYED_MUTEX,
nsIGfxInfo::FEATURE_WEBRENDER,
0
};

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

@ -306,6 +306,12 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature,
return NS_OK;
}
if (aFeature == nsIGfxInfo::FEATURE_WEBRENDER) {
*aStatus = nsIGfxInfo::FEATURE_BLOCKED_OS_VERSION;
aFailureId = "FEATURE_UNQUALIFIED_WEBRENDER_LINUX";
return NS_OK;
}
// Only check features relevant to Linux.
if (aFeature == nsIGfxInfo::FEATURE_OPENGL_LAYERS ||
aFeature == nsIGfxInfo::FEATURE_WEBGL_OPENGL ||

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

@ -363,6 +363,10 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature,
break;
}
return NS_OK;
} else if (aFeature == nsIGfxInfo::FEATURE_WEBRENDER) {
*aStatus = nsIGfxInfo::FEATURE_BLOCKED_OS_VERSION;
aFailureId = "FEATURE_UNQUALIFIED_WEBRENDER_MAC";
return NS_OK;
}
}

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

@ -133,8 +133,10 @@ interface nsIGfxInfo : nsISupports
const long FEATURE_ADVANCED_LAYERS = 22;
/* Whether D3D11 keyed mutex is supported, starting in 56 */
const long FEATURE_D3D11_KEYED_MUTEX = 23;
/* Whether WebRender is supported, starting in 62 */
const long FEATURE_WEBRENDER = 24;
/* the maximum feature value. */
const long FEATURE_MAX_VALUE = FEATURE_D3D11_KEYED_MUTEX;
const long FEATURE_MAX_VALUE = FEATURE_WEBRENDER;
/*
* A set of return values from GetFeatureStatus

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

@ -1404,6 +1404,36 @@ GfxInfo::GetGfxDriverInfo()
GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
DRIVER_EQUAL, V(15, 201, 1701, 0), "FEATURE_FAILURE_BUG_1447141_1");
////////////////////////////////////
// FEATURE_WEBRENDER
APPEND_TO_DRIVER_BLOCKLIST2(OperatingSystem::Windows,
(nsAString&) GfxDriverInfo::GetDeviceVendor(VendorIntel), GfxDriverInfo::allDevices,
nsIGfxInfo::FEATURE_WEBRENDER, nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions, "FEATURE_UNQUALIFIED_WEBRENDER_WIN_INTEL");
APPEND_TO_DRIVER_BLOCKLIST2(OperatingSystem::Windows,
(nsAString&) GfxDriverInfo::GetDeviceVendor(VendorATI), GfxDriverInfo::allDevices,
nsIGfxInfo::FEATURE_WEBRENDER, nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions, "FEATURE_UNQUALIFIED_WEBRENDER_WIN_ATI");
APPEND_TO_DRIVER_BLOCKLIST2(OperatingSystem::Windows,
(nsAString&) GfxDriverInfo::GetDeviceVendor(VendorAMD), GfxDriverInfo::allDevices,
nsIGfxInfo::FEATURE_WEBRENDER, nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions, "FEATURE_UNQUALIFIED_WEBRENDER_WIN_AMD");
// Allow Nvidia on Windows 10
APPEND_TO_DRIVER_BLOCKLIST2(OperatingSystem::Windows7,
(nsAString&) GfxDriverInfo::GetDeviceVendor(VendorNVIDIA), GfxDriverInfo::allDevices,
nsIGfxInfo::FEATURE_WEBRENDER, nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions, "FEATURE_UNQUALIFIED_WEBRENDER_NVIDIA_7");
APPEND_TO_DRIVER_BLOCKLIST2(OperatingSystem::Windows8,
(nsAString&) GfxDriverInfo::GetDeviceVendor(VendorNVIDIA), GfxDriverInfo::allDevices,
nsIGfxInfo::FEATURE_WEBRENDER, nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions, "FEATURE_UNQUALIFIED_WEBRENDER_NVIDIA_8");
APPEND_TO_DRIVER_BLOCKLIST2(OperatingSystem::Windows8_1,
(nsAString&) GfxDriverInfo::GetDeviceVendor(VendorNVIDIA), GfxDriverInfo::allDevices,
nsIGfxInfo::FEATURE_WEBRENDER, nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions, "FEATURE_UNQUALIFIED_WEBRENDER_NVIDIA_8_1");
}
return *mDriverInfo;
}