Bug 1387764 - Disable WebRender if HW_COMPOSITING is disabled. r=kats
authorMichael Smith <michael@spinda.net>
Tue, 08 Aug 2017 16:01:36 -0700
changeset 423169 20a3ffcebfd188d3408638d09cd16c0fad6b4cec
parent 423168 97a30295ad352bbc6d91794b511c8a4d9ba2e14c
child 423170 500a01cf896dbb9883cb85f162552e20b8facfc0
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1387764
milestone57.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 1387764 - Disable WebRender if HW_COMPOSITING is disabled. r=kats MozReview-Commit-ID: 5XSAw1tdi0P
gfx/thebes/gfxPlatform.cpp
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -2442,16 +2442,24 @@ gfxPlatform::InitWebRenderConfig()
     featureWebRender.UserEnable("Enabled by pref");
   } else {
     const char* env = PR_GetEnv("MOZ_WEBRENDER");
     if (env && *env == '1') {
       featureWebRender.UserEnable("Enabled by envvar");
     }
   }
 
+  // HW_COMPOSITING being disabled implies interfacing with the GPU might break
+  if (!gfxConfig::IsEnabled(Feature::HW_COMPOSITING)) {
+    featureWebRender.ForceDisable(
+      FeatureStatus::Unavailable,
+      "Hardware compositing is disabled",
+      NS_LITERAL_CSTRING("FEATURE_FAILURE_WEBRENDER_NEED_HWCOMP"));
+  }
+
   // WebRender relies on the GPU process when on Windows
 #ifdef XP_WIN
   if (!gfxConfig::IsEnabled(Feature::GPU_PROCESS)) {
     featureWebRender.ForceDisable(
       FeatureStatus::Unavailable,
       "GPU Process is disabled",
       NS_LITERAL_CSTRING("FEATURE_FAILURE_GPU_PROCESS_DISABLED"));
   }