mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 1627045 - Include some more information about feature status when blacklisting webrender. r=aosmond
This adds a helper for applying gfxinfo state to a gfxFeature. The helper includes the blacking list reason which should give us some more information for about:support and telemetry. Differential Revision: https://phabricator.services.mozilla.com/D69427 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
54d761893e
commit
ee2859de3e
@ -1216,6 +1216,23 @@ static bool IsFeatureSupported(long aFeature, bool aDefault) {
|
|||||||
}
|
}
|
||||||
return status == nsIGfxInfo::FEATURE_STATUS_OK;
|
return status == nsIGfxInfo::FEATURE_STATUS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void ApplyGfxInfoFeature(long aFeature, FeatureState &aFeatureState) {
|
||||||
|
nsCOMPtr<nsIGfxInfo> gfxInfo = services::GetGfxInfo();
|
||||||
|
nsCString blockId;
|
||||||
|
int32_t status;
|
||||||
|
if (!NS_SUCCEEDED(gfxInfo->GetFeatureStatus(aFeature, blockId, &status))) {
|
||||||
|
aFeatureState.Disable(FeatureStatus::BlockedNoGfxInfo, "gfxInfo is broken",
|
||||||
|
NS_LITERAL_CSTRING("FEATURE_FAILURE_NO_GFX_INFO"));
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if (status != nsIGfxInfo::FEATURE_STATUS_OK) {
|
||||||
|
aFeatureState.Disable(FeatureStatus::Blacklisted, "Blacklisted by gfxInfo",
|
||||||
|
blockId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* static*/
|
/* static*/
|
||||||
bool gfxPlatform::IsDXInterop2Blocked() {
|
bool gfxPlatform::IsDXInterop2Blocked() {
|
||||||
return !IsFeatureSupported(nsIGfxInfo::FEATURE_DX_INTEROP2, false);
|
return !IsFeatureSupported(nsIGfxInfo::FEATURE_DX_INTEROP2, false);
|
||||||
@ -3031,10 +3048,7 @@ void gfxPlatform::InitWebRenderConfig() {
|
|||||||
featureComp.UserForceEnable("Force enabled by pref");
|
featureComp.UserForceEnable("Force enabled by pref");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!IsFeatureSupported(nsIGfxInfo::FEATURE_WEBRENDER_COMPOSITOR, false)) {
|
ApplyGfxInfoFeature(nsIGfxInfo::FEATURE_WEBRENDER_COMPOSITOR, featureComp);
|
||||||
featureComp.Disable(FeatureStatus::Blacklisted, "Blacklisted",
|
|
||||||
NS_LITERAL_CSTRING("FEATURE_FAILURE_BLACKLIST"));
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef XP_WIN
|
#ifdef XP_WIN
|
||||||
if (!gfxVars::UseWebRenderDCompWin()) {
|
if (!gfxVars::UseWebRenderDCompWin()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user