Bug 1447913 - fix building of Skia on BSDs. r=jbeich
authorLee Salzman <lsalzman@mozilla.com>
Thu, 22 Mar 2018 14:30:53 -0400
changeset 463127 bdf1b3096b346d457ddea59c1ff7ff2babaefc99
parent 463126 e6df204b3970f1516dfb97d81c4db59a673c9e86
child 463128 d3510733b9365dca3257603721658f8e89b6de2e
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjbeich
bugs1447913
milestone61.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 1447913 - fix building of Skia on BSDs. r=jbeich MozReview-Commit-ID: AiaAgVMRLNN
gfx/skia/skia/include/config/SkUserConfig.h
gfx/skia/skia/src/gpu/GrAutoLocaleSetter.h
toolkit/moz.configure
--- a/gfx/skia/skia/include/config/SkUserConfig.h
+++ b/gfx/skia/skia/include/config/SkUserConfig.h
@@ -159,9 +159,17 @@
 #    define MOZ_IMPLICIT __attribute__((annotate("moz_implicit")))
 #  else
 #    define MOZ_IMPLICIT
 #  endif
 #endif
 
 #define MOZ_SKIA
 
+#ifndef SK_SUPPORT_GPU
+#  ifdef USE_SKIA_GPU
+#    define SK_SUPPORT_GPU 1
+#  else
+#    define SK_SUPPORT_GPU 0
+#  endif
 #endif
+
+#endif
--- a/gfx/skia/skia/src/gpu/GrAutoLocaleSetter.h
+++ b/gfx/skia/skia/src/gpu/GrAutoLocaleSetter.h
@@ -20,17 +20,17 @@
 
 #if defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS)
 #include <xlocale.h>
 #define HAVE_XLOCALE 1
 #else
 #define HAVE_XLOCALE 0
 #endif
 
-#if defined(SK_BUILD_FOR_ANDROID) || defined(__UCLIBC__) || defined(_NEWLIB_VERSION)
+#if defined(SK_BUILD_FOR_ANDROID) || defined(__UCLIBC__) || defined(_NEWLIB_VERSION) || defined(__NetBSD__)
 #define HAVE_LOCALE_T 0
 #else
 #define HAVE_LOCALE_T 1
 #endif
 
 /**
  * Helper class for ensuring that we don't use the wrong locale when building shaders. Android
  * doesn't support locale in the NDK, so this is a no-op there.
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -896,19 +896,16 @@ set_define('SK_BUILD_FOR_ANDROID_NDK', s
 
 option('--disable-skia-gpu', help='Disable use of Skia-GPU')
 
 @depends('--disable-skia-gpu', skia, target)
 def skia_gpu(value, skia, target):
     if value.origin == 'default':
         if not skia:
             return None
-        # Skia GPU support may not reliably build on certain *BSDs (see bug 1234494)
-        if target.os in ('NetBSD', 'OpenBSD'):
-            return None
     elif value and not skia:
         die('Cannot enable Skia-GPU without enabling Skia')
     if skia and value:
         return True
 
 set_config('MOZ_ENABLE_SKIA_GPU', skia_gpu)
 set_define('USE_SKIA_GPU', skia_gpu)
 
@@ -949,32 +946,27 @@ def sfntly_includes(skia_pdf_sfntly):
     if skia_pdf_sfntly:
         includes += [
             '/gfx/sfntly/cpp/src',
         ]
     return includes
 
 set_config('SFNTLY_INCLUDES', sfntly_includes)
 
-@depends(skia, skia_gpu)
-def skia_includes(skia, skia_gpu):
+@depends(skia)
+def skia_includes(skia):
     includes = []
     if skia:
         includes += [
             '/gfx/skia',
             '/gfx/skia/skia/include/config',
             '/gfx/skia/skia/include/core',
-        ]
-
-    if skia_gpu:
-        includes += [
             '/gfx/skia/skia/include/gpu',
             '/gfx/skia/skia/include/utils',
         ]
-
     return includes
 
 set_config('SKIA_INCLUDES', skia_includes)
 
 # Build Freetype in the tree
 # ==============================================================
 @depends(target, skia_pdf)
 def tree_freetype(target, skia_pdf):