firefox/build-big-endian.patch

55 lines
2.7 KiB
Diff
Raw Normal View History

2018-04-25 08:57:43 +00:00
diff -up firefox-60.0/gfx/skia/skia/include/core/SkColorPriv.h.big-endian firefox-60.0/gfx/skia/skia/include/core/SkColorPriv.h
diff -up firefox-60.0/gfx/skia/skia/include/core/SkImageInfo.h.big-endian firefox-60.0/gfx/skia/skia/include/core/SkImageInfo.h
--- firefox-60.0/gfx/skia/skia/include/core/SkImageInfo.h.big-endian 2018-04-25 10:28:21.367480569 +0200
+++ firefox-60.0/gfx/skia/skia/include/core/SkImageInfo.h 2018-04-25 10:34:58.240051062 +0200
@@ -83,8 +83,8 @@ enum SkColorType {
kN32_SkColorType = kBGRA_8888_SkColorType,
#elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A)
kN32_SkColorType = kRGBA_8888_SkColorType,
2018-04-25 08:57:43 +00:00
-#else
- #error "SK_*32_SHIFT values must correspond to BGRA or RGBA byte order"
+#else
+ kN32_SkColorType = kBGRA_8888_SkColorType
#endif
};
2018-04-25 08:57:43 +00:00
diff -up firefox-60.0/gfx/skia/skia/include/gpu/GrTypes.h.big-endian firefox-60.0/gfx/skia/skia/include/gpu/GrTypes.h
--- firefox-60.0/gfx/skia/skia/include/gpu/GrTypes.h.big-endian 2018-04-25 10:28:21.367480569 +0200
+++ firefox-60.0/gfx/skia/skia/include/gpu/GrTypes.h 2018-04-25 10:31:41.692759011 +0200
@@ -344,15 +344,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;
2017-08-02 09:19:05 +00:00
#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;
+ static const GrPixelConfig kSkiaGamma8888_GrPixelConfig = kSBGRA_8888_GrPixelConfig;
#endif
2018-04-25 08:57:43 +00:00
/**
diff -up firefox-60.0/gfx/skia/skia/include/private/GrColor.h.big-endian firefox-60.0/gfx/skia/skia/include/private/GrColor.h
--- firefox-60.0/gfx/skia/skia/include/private/GrColor.h.big-endian 2018-04-16 22:05:28.000000000 +0200
+++ firefox-60.0/gfx/skia/skia/include/private/GrColor.h 2018-04-25 10:28:21.367480569 +0200
@@ -74,8 +74,13 @@ static inline GrColor GrColorPackA4(unsi
* Since premultiplied means that alpha >= color, we construct a color with
* each component==255 and alpha == 0 to be "illegal"
*/
-#define GrColor_ILLEGAL (~(0xFF << GrColor_SHIFT_A))
+//Just for big endian platforms, little has: (~(0xFF << GrColor_SHIFT_A))
+#ifdef SK_CPU_BENDIAN
+#define GrColor_ILLEGAL 0xFFFFFF00
+#else
+#define GrColor_ILLEGAL (~(0xFF << GrColor_SHIFT_A))
+#endif
#define GrColor_WHITE 0xFFFFFFFF
#define GrColor_TRANSPARENT_BLACK 0x0