Bug 1560335 - Enable webrender for Pixel 2 on GeckoView Nightly. r=aosmond
☠☠ backed out by 65d289505f47 ☠ ☠
authorJamie Nicol <jnicol@mozilla.com>
Mon, 09 Sep 2019 17:10:42 +0000
changeset 553735 aca75dcd43796c85c84eee9c7d03251e7405d9bd
parent 553734 cf79c0e479c11154927eceefcc4812a48b29bca8
child 553736 412d310db37a3de9c21dc7f7e920490c0a5541e4
push id12169
push userffxbld-merge
push dateMon, 14 Oct 2019 16:59:29 +0000
treeherdermozilla-beta@c819687300ed [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaosmond
bugs1560335
milestone71.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1560335 - Enable webrender for Pixel 2 on GeckoView Nightly. r=aosmond Differential Revision: https://phabricator.services.mozilla.com/D35436
gfx/src/gfxTelemetry.cpp
gfx/src/gfxTelemetry.h
gfx/thebes/gfxPlatform.cpp
widget/android/GfxInfo.cpp
--- a/gfx/src/gfxTelemetry.cpp
+++ b/gfx/src/gfxTelemetry.cpp
@@ -47,16 +47,18 @@ const char* FeatureStatusToString(Featur
     case FeatureStatus::BlockedReleaseChannelIntel:
       return "blocked-release-channel-intel";
     case FeatureStatus::BlockedReleaseChannelAMD:
       return "blocked-release-channel-amd";
     case FeatureStatus::BlockedReleaseChannelNvidia:
       return "blocked-release-channel-nvidia";
     case FeatureStatus::BlockedReleaseChannelBattery:
       return "blocked-release-channel-battery";
+    case FeatureStatus::BlockedReleaseChannelAndroid:
+      return "blocked-release-channel-android";
     case FeatureStatus::Blacklisted:
       return "blacklisted";
     case FeatureStatus::OptIn:
       return "opt-in";
     case FeatureStatus::Failed:
       return "failed";
     case FeatureStatus::Disabled:
       return "disabled";
--- a/gfx/src/gfxTelemetry.h
+++ b/gfx/src/gfxTelemetry.h
@@ -39,16 +39,17 @@ enum class FeatureStatus {
   BlockedScreenTooLarge,
   BlockedScreenUnknown,
   BlockedNoGfxInfo,
   BlockedOverride,
   BlockedReleaseChannelIntel,
   BlockedReleaseChannelAMD,
   BlockedReleaseChannelNvidia,
   BlockedReleaseChannelBattery,
+  BlockedReleaseChannelAndroid,
 
   // This feature has been blocked by the graphics blacklist.
   Blacklisted,
 
   // This feature is disabled by default, and so activation isn't attempted
   // unless something explicitly enables it.
   OptIn,
 
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -2870,16 +2870,17 @@ static FeatureState& WebRenderHardwareQu
   }
 
   if (status != nsIGfxInfo::FEATURE_STATUS_OK) {
     featureWebRenderQualified.Disable(FeatureStatus::Blacklisted,
                                       "No qualified hardware", failureId);
     return featureWebRenderQualified;
   }
 
+#ifndef MOZ_WIDGET_ANDROID
   nsAutoString adapterVendorID;
   gfxInfo->GetAdapterVendorID(adapterVendorID);
 
   nsAutoString adapterDeviceID;
   gfxInfo->GetAdapterDeviceID(adapterDeviceID);
   nsresult valid;
   int32_t deviceID = adapterDeviceID.ToInteger(&valid, 16);
   if (valid != NS_OK) {
@@ -2936,16 +2937,24 @@ static FeatureState& WebRenderHardwareQu
           NS_LITERAL_CSTRING("FEATURE_FAILURE_RELEASE_CHANNEL_BATTERY"));
 #endif  // !NIGHTLY_BUILD
     } else {
       featureWebRenderQualified.Disable(
           FeatureStatus::BlockedHasBattery, "Has battery",
           NS_LITERAL_CSTRING("FEATURE_FAILURE_WR_HAS_BATTERY"));
     }
   }
+#else // !MOZ_WIDGET_ANDROID
+#ifndef NIGHTLY_BUILD
+  featureWebRenderQualified.Disable(
+    FeatureStatus::BlockedReleaseChannelAndroid,
+    "Release channel and Android",
+    NS_LITERAL_CSTRING("FEATURE_FAILURE_RELEASE_CHANNEL_ANDROID"));
+#endif
+#endif
   return featureWebRenderQualified;
 }
 
 void gfxPlatform::InitWebRenderConfig() {
   bool prefEnabled = WebRenderPrefEnabled();
   bool envvarEnabled = WebRenderEnvvarEnabled();
 
   // WR? WR+   => means WR was enabled via gfx.webrender.all.qualified on
--- a/widget/android/GfxInfo.cpp
+++ b/widget/android/GfxInfo.cpp
@@ -522,16 +522,29 @@ nsresult GfxInfo::GetFeatureStatusImpl(
       if (isBlocked) {
         *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DEVICE;
         aFailureId = "FEATURE_FAILURE_VPx";
       } else {
         *aStatus = nsIGfxInfo::FEATURE_STATUS_OK;
       }
       return NS_OK;
     }
+
+    if (aFeature == FEATURE_WEBRENDER) {
+      NS_LossyConvertUTF16toASCII model(mModel);
+      bool isBlocked = !model.Equals("Pixel 2", nsCaseInsensitiveCStringComparator());
+
+      if (isBlocked) {
+        *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DEVICE;
+        aFailureId = "FEATURE_FAILURE_WEBRENDER_BLOCKED_DEVICE";
+      } else {
+        *aStatus = nsIGfxInfo::FEATURE_STATUS_OK;
+      }
+      return NS_OK;
+    }
   }
 
   return GfxInfoBase::GetFeatureStatusImpl(
       aFeature, aStatus, aSuggestedDriverVersion, aDriverInfo, aFailureId, &os);
 }
 
 static nsCString FeatureCacheOsVerPrefName(int32_t aFeature) {
   nsCString osPrefName;