Bug 1550023 - Allow WR on a subset of Intel to ride into early beta on Windows. r=jrmuizel a=RyanVM
authorKartikaya Gupta <kgupta@mozilla.com>
Fri, 05 Jul 2019 22:08:13 +0000
changeset 544504 ebb122d3a9039666139745370d309f4b7739c098
parent 544503 0b6b434c5303fa3683d013562be0f727c35cc22f
child 544505 1079a6582a0687c1b8457e9ab1417de11cd557aa
push id2131
push userffxbld-merge
push dateMon, 26 Aug 2019 18:30:20 +0000
treeherdermozilla-release@b19ffb3ca153 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel, RyanVM
bugs1550023
milestone69.0
Bug 1550023 - Allow WR on a subset of Intel to ride into early beta on Windows. r=jrmuizel a=RyanVM This uses positive-but-empty #if conditions with else clauses rather than inverted conditions for better readability and documentation.
gfx/thebes/gfxPlatform.cpp
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -2754,39 +2754,50 @@ static void UpdateWRQualificationForInte
       break;
     }
   }
   if (!supported) {
     HardwareTooOldForWR(aFeature);
     return;
   }
 
-#ifdef MOZ_WIDGET_GTK
-  // Performance is not great on 4k screens with WebRender + Linux.
-  // Disable it for now if it is too large.
-  const int32_t kMaxPixelsLinux = 3440 * 1440;  // UWQHD
-  if (aScreenPixels > kMaxPixelsLinux) {
+  // Performance is not great on 4k screens with WebRender.
+  // Disable it for now on all release platforms, and also on Linux
+  // nightly. We only allow it on Windows nightly.
+#if defined(XP_WIN) && defined(NIGHTLY_BUILD)
+  // Windows nightly, so don't do screen size checks
+#else
+  // Windows release, Linux nightly, Linux release. Do screen size
+  // checks. (macOS is still completely blocked by the blocklist).
+  const int32_t kMaxPixels = 3440 * 1440;  // UWQHD
+  if (aScreenPixels > kMaxPixels) {
     aFeature.Disable(
         FeatureStatus::BlockedScreenTooLarge, "Screen size too large",
         NS_LITERAL_CSTRING("FEATURE_FAILURE_SCREEN_SIZE_TOO_LARGE"));
-  } else if (aScreenPixels <= 0) {
+    return;
+  }
+  if (aScreenPixels <= 0) {
     aFeature.Disable(
         FeatureStatus::BlockedScreenUnknown, "Screen size unknown",
         NS_LITERAL_CSTRING("FEATURE_FAILURE_SCREEN_SIZE_UNKNOWN"));
-  } else {
-#endif  // MOZ_WIDGET_GTK
-#ifndef NIGHTLY_BUILD
-    aFeature.Disable(
-        FeatureStatus::BlockedReleaseChannelIntel,
-        "Release channel and Intel",
-        NS_LITERAL_CSTRING("FEATURE_FAILURE_RELEASE_CHANNEL_INTEL"));
-#endif  // !NIGHTLY_BUILD
-#ifdef MOZ_WIDGET_GTK
+    return;
   }
-#endif  // MOZ_WIDGET_GTK
+#endif
+
+#if ((defined(XP_WIN) && defined(EARLY_BETA_OR_EARLIER)) || \
+     (defined(MOZ_WIDGET_GTK) && defined(NIGHTLY_BUILD)))
+  // Qualify Intel graphics cards on Windows up to early beta, and
+  // on Linux nightly.
+#else
+  // Disqualify everywhere else
+  aFeature.Disable(
+      FeatureStatus::BlockedReleaseChannelIntel,
+      "Release channel and Intel",
+      NS_LITERAL_CSTRING("FEATURE_FAILURE_RELEASE_CHANNEL_INTEL"));
+#endif
 }
 
 static FeatureState& WebRenderHardwareQualificationStatus(
     const IntSize& aScreenSize, bool aHasBattery, nsCString& aOutFailureId) {
   FeatureState& featureWebRenderQualified =
       gfxConfig::GetFeature(Feature::WEBRENDER_QUALIFIED);
   featureWebRenderQualified.EnableByDefault();