Update www/firefox to version 73.0_2,1
[dports.git] / www / firefox / files / patch-bug1504834_comment5
1 https://bugzilla.mozilla.org/show_bug.cgi?id=1504834#c5
2 https://bugzilla.mozilla.org/attachment.cgi?id=9028600
3 Rough progress patch
4
5
6 diff -r 53107afbc21e gfx/skia/skia/third_party/skcms/skcms.cc
7 --- gfx/skia/skia/third_party/skcms/skcms.cc    Wed Nov 07 04:50:21 2018 +0000
8 +++ gfx/skia/skia/third_party/skcms/skcms.cc    Thu Nov 29 12:49:35 2018 +0000
9 @@ -30,6 +30,8 @@
10          #include <avx512fintrin.h>
11          #include <avx512dqintrin.h>
12      #endif
13 +#else
14 +    #define SKCMS_PORTABLE
15  #endif
16  
17  // sizeof(x) will return size_t, which is 32-bit on some machines and 64-bit on others.
18 @@ -280,20 +282,28 @@ enum {
19  static uint16_t read_big_u16(const uint8_t* ptr) {
20      uint16_t be;
21      memcpy(&be, ptr, sizeof(be));
22 -#if defined(_MSC_VER)
23 -    return _byteswap_ushort(be);
24 +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
25 +    return be;
26  #else
27 +    #if defined(_MSC_VER)
28 +    return _byteswap_ushort(be);
29 +    #else
30      return __builtin_bswap16(be);
31 +    #endif
32  #endif
33  }
34  
35  static uint32_t read_big_u32(const uint8_t* ptr) {
36      uint32_t be;
37      memcpy(&be, ptr, sizeof(be));
38 -#if defined(_MSC_VER)
39 -    return _byteswap_ulong(be);
40 +#if __BYTE_ORDER == __ORDER_BIG_ENDIAN__
41 +    return be;
42  #else
43 +    #if defined(_MSC_VER)
44 +    return _byteswap_ulong(be);
45 +    #else
46      return __builtin_bswap32(be);
47 +    #endif
48  #endif
49  }
50  
51 --- gfx/2d/DrawTargetSkia.cpp.orig      2019-09-21 15:51:04.129603000 +0200
52 +++ gfx/2d/DrawTargetSkia.cpp   2019-09-21 15:52:11.900316000 +0200
53 @@ -138,8 +138,7 @@ static IntRect CalculateSurfaceBounds(const IntSize& a
54    return surfaceBounds.Intersect(bounds);
55  }
56  
57 -static const int kARGBAlphaOffset =
58 -    SurfaceFormat::A8R8G8B8_UINT32 == SurfaceFormat::B8G8R8A8 ? 3 : 0;
59 +static const int kARGBAlphaOffset = 0;
60  
61  static bool VerifyRGBXFormat(uint8_t* aData, const IntSize& aSize,
62                               const int32_t aStride, SurfaceFormat aFormat) {
63 --- gfx/2d/Types.h.orig 2019-09-21 15:52:47.044803000 +0200
64 +++ gfx/2d/Types.h      2019-09-21 15:53:40.113641000 +0200
65 @@ -87,15 +87,8 @@ enum class SurfaceFormat : int8_t {
66  // The following values are endian-independent synonyms. The _UINT32 suffix
67  // indicates that the name reflects the layout when viewed as a uint32_t
68  // value.
69 -#if MOZ_LITTLE_ENDIAN()
70    A8R8G8B8_UINT32 = B8G8R8A8,  // 0xAARRGGBB
71    X8R8G8B8_UINT32 = B8G8R8X8,  // 0x00RRGGBB
72 -#elif MOZ_BIG_ENDIAN()
73 -  A8R8G8B8_UINT32 = A8R8G8B8,  // 0xAARRGGBB
74 -  X8R8G8B8_UINT32 = X8R8G8B8,  // 0x00RRGGBB
75 -#else
76 -#  error "bad endianness"
77 -#endif
78  
79    // The following values are OS and endian-independent synonyms.
80    //