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