Bug 1292326 - Disable layers acceleration by default when using mesa software rasterizers. r?jrmuizel draft
authorAndrew Comminos <andrew@comminos.com>
Thu, 04 Aug 2016 16:14:27 -0400
changeset 396854 11277bdf73134ed44dcfb3179da61c2f3c46ba7f
parent 396180 8ab41761981936b5fb655e07f4d0d725ea514905
child 396855 782e0e3715cafbb74375a903045b6b781fec9e28
push id25137
push userbmo:andrew@comminos.com
push dateThu, 04 Aug 2016 20:20:38 +0000
reviewersjrmuizel
bugs1292326
milestone51.0a1
Bug 1292326 - Disable layers acceleration by default when using mesa software rasterizers. r?jrmuizel MozReview-Commit-ID: 9H1XiuPpw15
widget/GfxInfoX11.cpp
--- a/widget/GfxInfoX11.cpp
+++ b/widget/GfxInfoX11.cpp
@@ -294,16 +294,26 @@ GfxInfo::GetFeatureStatusImpl(int32_t aF
     // see bug 696636
     *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DEVICE;
     aFailureId = "FEATURE_FAILURE_OPENGL_1";
     return NS_OK;
   }
 
   // Don't evaluate any special cases if we're checking the downloaded blocklist.
   if (!aDriverInfo.Length()) {
+    // Blacklist software GL implementations from using layers acceleration.
+    // On the test infrastructure, we'll force-enable layers acceleration.
+    if (aFeature == nsIGfxInfo::FEATURE_OPENGL_LAYERS &&
+        (mIsLlvmpipe || mIsOldSwrast))
+    {
+      *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DEVICE;
+      aFailureId = "FEATURE_FAILURE_SOFTWARE_GL";
+      return NS_OK;
+    }
+
     // Only check features relevant to Linux.
     if (aFeature == nsIGfxInfo::FEATURE_OPENGL_LAYERS ||
         aFeature == nsIGfxInfo::FEATURE_WEBGL_OPENGL ||
         aFeature == nsIGfxInfo::FEATURE_WEBGL_MSAA) {
 
       // whitelist the linux test slaves' current configuration.
       // this is necessary as they're still using the slightly outdated 190.42 driver.
       // this isn't a huge risk, as at least this is the exact setting in which we do continuous testing,