# HG changeset patch
# Parent b7eb1ce0237d6125b75bc8ff1cb3afc328d6e78c
# User Steve Singer <steve@ssinger.info>
Bug 1005535 - Get skia GPU building on big endian.
diff -up mozilla-aurora/configure.in.mozbz-1005535 mozilla-aurora/configure.in
--- mozilla-aurora/configure.in.mozbz-1005535 2015-12-18 14:55:09.415983194 +0100
+++ mozilla-aurora/configure.in 2015-12-18 14:58:46.301911086 +0100
@@ -8279,12 +8279,12 @@ if test "$MOZ_ENABLE_SKIA"; then
AC_DEFINE(SK_BUILD_FOR_ANDROID_NDK)
fi
- if test "${CPU_ARCH}" != "ppc" -a "${CPU_ARCH}" != "ppc64" -a "${CPU_ARCH}" != "sparc" -a -z "$MOZ_DISABLE_SKIA_GPU" ; then
+# if test "${CPU_ARCH}" != "ppc" -a "${CPU_ARCH}" != "ppc64" -a "${CPU_ARCH}" != "sparc" -a -z "$MOZ_DISABLE_SKIA_GPU" ; then
SKIA_INCLUDES="$SKIA_INCLUDES /gfx/skia/skia/include/gpu /gfx/skia/skia/include/utils"
MOZ_ENABLE_SKIA_GPU=1
AC_DEFINE(USE_SKIA_GPU)
AC_SUBST(MOZ_ENABLE_SKIA_GPU)
- fi
+# fi
fi
AC_SUBST(MOZ_ENABLE_SKIA)
AC_SUBST_LIST(SKIA_INCLUDES)
diff -up mozilla-aurora/gfx/skia/skia/include/config/SkUserConfig.h.mozbz-1005535 mozilla-aurora/gfx/skia/skia/include/config/SkUserConfig.h
diff -up mozilla-aurora/gfx/skia/skia/include/core/SkColorPriv.h.mozbz-1005535 mozilla-aurora/gfx/skia/skia/include/core/SkColorPriv.h
--- mozilla-aurora/gfx/skia/skia/include/core/SkColorPriv.h.mozbz-1005535 2015-12-16 16:47:08.000000000 +0100
+++ mozilla-aurora/gfx/skia/skia/include/core/SkColorPriv.h 2015-12-18 14:55:09.416983194 +0100
@@ -32,17 +32,7 @@
* Here we enforce this constraint.
*/
-#ifdef SK_CPU_BENDIAN
- #define SK_RGBA_R32_SHIFT 24
- #define SK_RGBA_G32_SHIFT 16
- #define SK_RGBA_B32_SHIFT 8
- #define SK_RGBA_A32_SHIFT 0
- #define SK_BGRA_B32_SHIFT 24
- #define SK_BGRA_G32_SHIFT 16
- #define SK_BGRA_R32_SHIFT 8
- #define SK_BGRA_A32_SHIFT 0
-#else
#define SK_RGBA_R32_SHIFT 0
#define SK_RGBA_G32_SHIFT 8
#define SK_RGBA_B32_SHIFT 16
@@ -52,7 +42,7 @@
#define SK_BGRA_G32_SHIFT 8
#define SK_BGRA_R32_SHIFT 16
#define SK_BGRA_A32_SHIFT 24
-#endif
+
#if defined(SK_PMCOLOR_IS_RGBA) && defined(SK_PMCOLOR_IS_BGRA)
#error "can't define PMCOLOR to be RGBA and BGRA"
diff -up mozilla-aurora/gfx/skia/skia/include/core/SkImageInfo.h.mozbz-1005535 mozilla-aurora/gfx/skia/skia/include/core/SkImageInfo.h
--- mozilla-aurora/gfx/skia/skia/include/core/SkImageInfo.h.mozbz-1005535 2015-12-16 16:47:08.000000000 +0100
+++ mozilla-aurora/gfx/skia/skia/include/core/SkImageInfo.h 2015-12-18 14:55:09.416983194 +0100
@@ -88,9 +88,10 @@ enum SkColorType {
#elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A)
kN32_SkColorType = kRGBA_8888_SkColorType,
#else
-#error "SK_*32_SHFIT values must correspond to BGRA or RGBA byte order"
+ kN32_SkColorType = kBGRA_8888_SkColorType
#endif
+
#ifdef SK_SUPPORT_LEGACY_N32_NAME
kPMColor_SkColorType = kN32_SkColorType
#endif
diff -up mozilla-aurora/gfx/skia/skia/include/gpu/GrTypes.h.mozbz-1005535 mozilla-aurora/gfx/skia/skia/include/gpu/GrTypes.h
--- mozilla-aurora/gfx/skia/skia/include/gpu/GrTypes.h.mozbz-1005535 2015-12-16 16:47:08.000000000 +0100
+++ mozilla-aurora/gfx/skia/skia/include/gpu/GrTypes.h 2015-12-18 14:55:09.416983194 +0100
@@ -309,15 +309,13 @@ enum GrPixelConfig {
static const int kGrPixelConfigCnt = kLast_GrPixelConfig + 1;
// Aliases for pixel configs that match skia's byte order.
-#ifndef SK_CPU_LENDIAN
- #error "Skia gpu currently assumes little endian"
-#endif
+
#if SK_PMCOLOR_BYTE_ORDER(B,G,R,A)
static const GrPixelConfig kSkia8888_GrPixelConfig = kBGRA_8888_GrPixelConfig;
#elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A)
static const GrPixelConfig kSkia8888_GrPixelConfig = kRGBA_8888_GrPixelConfig;
#else
- #error "SK_*32_SHIFT values must correspond to GL_BGRA or GL_RGBA format."
+ static const GrPixelConfig kSkia8888_GrPixelConfig = kBGRA_8888_GrPixelConfig;
#endif
// Returns true if the pixel config is a GPU-specific compressed format