Backed out changeset 34e912d9305a (bug 1543217) chrome failures at build/src/gfx/config/gfxFeature.cpp

This commit is contained in:
Coroiu Cristina 2019-04-10 20:31:00 +03:00
parent 1cdceb7b22
commit 02079beb91
5 changed files with 9 additions and 59 deletions

View File

@ -923,7 +923,6 @@ void gfxPlatform::Init() {
#else
# error "No gfxPlatform implementation available"
#endif
gPlatform->PopulateScreenInfo();
gPlatform->InitAcceleration();
gPlatform->InitWebRenderConfig();
// When using WebRender, we defer initialization of the D3D11 devices until
@ -961,6 +960,7 @@ void gfxPlatform::Init() {
InitLayersIPC();
gPlatform->PopulateScreenInfo();
gPlatform->ComputeTileSize();
#ifdef MOZ_ENABLE_FREETYPE
@ -2511,7 +2511,7 @@ static bool CalculateWrQualifiedPrefValue() {
}
static FeatureState& WebRenderHardwareQualificationStatus(
const IntSize& aScreenSize, bool aHasBattery, nsCString& aOutFailureId) {
bool aHasBattery, nsCString& aOutFailureId) {
FeatureState& featureWebRenderQualified =
gfxConfig::GetFeature(Feature::WEBRENDER_QUALIFIED);
featureWebRenderQualified.EnableByDefault();
@ -2576,8 +2576,7 @@ static FeatureState& WebRenderHardwareQualificationStatus(
FeatureStatus::Blocked, "Device too old",
NS_LITERAL_CSTRING("FEATURE_FAILURE_DEVICE_TOO_OLD"));
}
} else if (adapterVendorID == u"0x8086" ||
adapterVendorID == u"mesa/i965") { // Intel
} else if (adapterVendorID == u"0x8086") { // Intel
const uint16_t supportedDevices[] = {
0x191d, // HD Graphics P530
0x192d, // Iris Pro Graphics P555
@ -2606,18 +2605,6 @@ static FeatureState& WebRenderHardwareQualificationStatus(
featureWebRenderQualified.Disable(
FeatureStatus::Blocked, "Device too old",
NS_LITERAL_CSTRING("FEATURE_FAILURE_DEVICE_TOO_OLD"));
} else if (adapterVendorID == u"mesa/i965") {
const int32_t maxPixels = 3440 * 1440; // UWQHD
int32_t pixels = aScreenSize.width * aScreenSize.height;
if (pixels > maxPixels) {
featureWebRenderQualified.Disable(
FeatureStatus::Blocked, "Screen size too large",
NS_LITERAL_CSTRING("FEATURE_FAILURE_SCREEN_SIZE_TOO_LARGE"));
} else if (pixels <= 0) {
featureWebRenderQualified.Disable(
FeatureStatus::Blocked, "Screen size unknown",
NS_LITERAL_CSTRING("FEATURE_FAILURE_SCREEN_SIZE_UNKNOWN"));
}
}
#endif
} else {
@ -2666,8 +2653,7 @@ void gfxPlatform::InitWebRenderConfig() {
nsCString failureId;
FeatureState& featureWebRenderQualified =
WebRenderHardwareQualificationStatus(GetScreenSize(), HasBattery(),
failureId);
WebRenderHardwareQualificationStatus(HasBattery(), failureId);
FeatureState& featureWebRender = gfxConfig::GetFeature(Feature::WEBRENDER);
featureWebRender.DisableByDefault(
@ -2762,14 +2748,6 @@ void gfxPlatform::InitWebRenderConfig() {
WebRenderDebugPrefChangeCallback, WR_DEBUG_PREF);
}
}
#ifdef XP_LINUX
else {
// Hardware compositing should be disabled by default if we aren't using
// WebRender, but may still have been enabled by prefs.
gfxConfig::Disable(Feature::HW_COMPOSITING, FeatureStatus::Blocked,
"Acceleration blocked by platform");
}
#endif
#ifdef XP_WIN
if (Preferences::GetBool("gfx.webrender.dcomp-win.enabled", false)) {

View File

@ -736,7 +736,7 @@ class gfxPlatform : public mozilla::layers::MemoryPressureListener {
gfxPlatform();
virtual ~gfxPlatform();
virtual bool HasBattery() { return false; }
virtual bool HasBattery() { return true; }
virtual void InitAcceleration();
virtual void InitWebRenderConfig();

View File

@ -330,7 +330,7 @@ uint32_t gfxPlatformGtk::MaxGenericSubstitions() {
}
bool gfxPlatformGtk::AccelerateLayersByDefault() {
return true;
return gfxPrefs::WebRenderAll();
}
void gfxPlatformGtk::GetPlatformCMSOutputProfile(void*& mem, size_t& size) {

View File

@ -307,34 +307,6 @@ const nsTArray<GfxDriverInfo> &GfxInfo::GetGfxDriverInfo() {
GfxDriverInfo::allDevices, GfxDriverInfo::allFeatures,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_LESS_THAN,
V(13, 15, 100, 1), "FEATURE_FAILURE_OLD_FGLRX", "fglrx 13.15.100.1");
////////////////////////////////////
// FEATURE_WEBRENDER
// Mesa baseline (chosen arbitrarily as that which ships with
// Ubuntu 18.04 LTS).
APPEND_TO_DRIVER_BLOCKLIST(
OperatingSystem::Linux,
(nsAString &)GfxDriverInfo::GetDeviceVendor(VendorMesaAll),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBRENDER,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_LESS_THAN,
V(18, 2, 8, 0), "FEATURE_FAILURE_WEBRENDER_OLD_MESA", "Mesa 18.2.8.0");
// Disable on all NVIDIA devices for now.
APPEND_TO_DRIVER_BLOCKLIST(
OperatingSystem::Linux,
(nsAString &)GfxDriverInfo::GetDeviceVendor(VendorNVIDIA),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBRENDER,
nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_COMPARISON_IGNORED,
V(0, 0, 0, 0), "FEATURE_FAILURE_WEBRENDER_NO_LINUX_NVIDIA", "");
// Disable on all ATI devices for now.
APPEND_TO_DRIVER_BLOCKLIST(
OperatingSystem::Linux,
(nsAString &)GfxDriverInfo::GetDeviceVendor(VendorATI),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBRENDER,
nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_COMPARISON_IGNORED,
V(0, 0, 0, 0), "FEATURE_FAILURE_WEBRENDER_NO_LINUX_ATI", "");
}
return *sDriverInfo;
}

View File

@ -1602,9 +1602,9 @@ const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
////////////////////////////////////
// FEATURE_WEBRENDER
// We are blocking most hardware explicitly in gfxPlatform.cpp where we
// check for the WEBRENDER_QUALIFIED feature. However we also want to block
// some specific Nvidia cards for being too low-powered, so we do that here.
// We are blocking all non-Nvidia cards in gfxPlatform.cpp where we check
// for the WEBRENDER_QUALIFIED feature. However we also want to block some
// specific Nvidia cards for being too low-powered, so we do that here.
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows10,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorNVIDIA),