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