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 502497 859e84396f6dc4584bbb0d53be2756c26ca78ea0
parent 502496 765b9da8b818804ee68c8e18f92d2bdaa1794d8e
child 502498 93c199bb39288eb84cec5d26723a400263000f59
push id100874
push usermwoodrow@mozilla.com
push dateMon, 18 Nov 2019 21:23:13 +0000
treeherderautoland@859e84396f6d [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 */