Bug 1595093 - Make sure we always have a valid software backend, regardless of what prefs the user sets. r=lsalzman
authorMatt Woodrow <mwoodrow@mozilla.com>
Mon, 18 Nov 2019 21:15:58 +0000
changeset 502480 859e84396f6dc4584bbb0d53be2756c26ca78ea0
parent 502479 765b9da8b818804ee68c8e18f92d2bdaa1794d8e
child 502481 93c199bb39288eb84cec5d26723a400263000f59
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslsalzman
bugs1595093
milestone72.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 1595093 - Make sure we always have a valid software backend, regardless of what prefs the user sets. r=lsalzman Differential Revision: https://phabricator.services.mozilla.com/D53718
gfx/thebes/gfxPlatform.cpp
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -1936,16 +1936,19 @@ void gfxPlatform::InitBackendPrefs(Backe
     mContentBackendBitmask |= BackendTypeBit(aPrefsData.mContentDefault);
   }
 
   uint32_t swBackendBits = BackendTypeBit(BackendType::SKIA);
 #ifdef MOZ_WIDGET_GTK
   swBackendBits |= BackendTypeBit(BackendType::CAIRO);
 #endif
   mSoftwareBackend = GetContentBackendPref(swBackendBits);
+  if (mSoftwareBackend == BackendType::NONE) {
+    mSoftwareBackend = BackendType::SKIA;
+  }
 
   if (XRE_IsParentProcess()) {
     gfxVars::SetContentBackend(mContentBackend);
     gfxVars::SetSoftwareBackend(mSoftwareBackend);
   }
 }
 
 /* static */