Bug 1402704 - Ensure WebRender cannot be enabled on Android. r?jrmuizel draft
authorKartikaya Gupta <kgupta@mozilla.com>
Mon, 25 Sep 2017 10:47:42 -0400
changeset 669879 0e6eab6aff0c3bfc3e34ac1c1d51a7a6a1efe887
parent 669742 5f3f19824efa14cc6db546baf59c54a0fc15ddc9
child 733078 1d8cf450a50ef9c7d558a2a453430b0e023a9924
push id81458
push userkgupta@mozilla.com
push dateMon, 25 Sep 2017 14:48:03 +0000
reviewersjrmuizel
bugs1402704
milestone58.0a1
Bug 1402704 - Ensure WebRender cannot be enabled on Android. r?jrmuizel MozReview-Commit-ID: AMZ3niupnJ8
gfx/thebes/gfxPlatform.cpp
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -2536,16 +2536,23 @@ gfxPlatform::InitWebRenderConfig()
         "ANGLE is disabled",
         NS_LITERAL_CSTRING("FEATURE_FAILURE_ANGLE_DISABLED"));
     } else {
       gfxVars::SetUseWebRenderANGLE(gfxConfig::IsEnabled(Feature::WEBRENDER));
     }
   }
 #endif
 
+#ifdef MOZ_WIDGET_ANDROID
+  featureWebRender.ForceDisable(
+    FeatureStatus::Unavailable,
+    "WebRender not ready for use on Android",
+    NS_LITERAL_CSTRING("FEATURE_FAILURE_ANDROID"));
+#endif
+
   // gfxFeature is not usable in the GPU process, so we use gfxVars to transmit this feature
   if (gfxConfig::IsEnabled(Feature::WEBRENDER)) {
     gfxVars::SetUseWebRender(true);
     reporter.SetSuccessful();
 
     if (XRE_IsParentProcess()) {
       Preferences::RegisterPrefixCallbackAndCall(WebRenderDebugPrefChangeCallback,
                                                  WR_DEBUG_PREF);