mozilla-bmo1504834-part1.patch
branchfirefox72
changeset 1119 4c5d44d40a03
parent 1101 a4709640638e
child 1121 004e4b1efb26
equal deleted inserted replaced
1118:27c3f029180a 1119:4c5d44d40a03
     1 # HG changeset patch
     1 # HG changeset patch
     2 # Parent  051b75a600dfbf7503c3485cebfd34d4eb29be96
     2 # Parent  83da7ee18178639b2a89d5e21f78e190e4e72d7e
     3 Taken from https://bugzilla.mozilla.org/show_bug.cgi?id=1504834
     3 Taken from https://bugzilla.mozilla.org/show_bug.cgi?id=1504834
     4 
     4 
     5 diff -r 051b75a600df gfx/2d/DrawTargetSkia.cpp
     5 diff -r 83da7ee18178 gfx/2d/DrawTargetSkia.cpp
     6 --- a/gfx/2d/DrawTargetSkia.cpp	Fri Jul 05 12:42:44 2019 +0200
     6 --- a/gfx/2d/DrawTargetSkia.cpp	Mon Jul 22 00:00:00 2019 +0200
     7 +++ b/gfx/2d/DrawTargetSkia.cpp	Mon Jul 08 10:59:30 2019 +0200
     7 +++ b/gfx/2d/DrawTargetSkia.cpp	Wed Jan 08 12:17:44 2020 +0100
     8 @@ -138,8 +138,7 @@
     8 @@ -136,8 +136,7 @@
     9    return surfaceBounds.Intersect(bounds);
     9    return surfaceBounds.Intersect(bounds);
    10  }
    10  }
    11  
    11  
    12 -static const int kARGBAlphaOffset =
    12 -static const int kARGBAlphaOffset =
    13 -    SurfaceFormat::A8R8G8B8_UINT32 == SurfaceFormat::B8G8R8A8 ? 3 : 0;
    13 -    SurfaceFormat::A8R8G8B8_UINT32 == SurfaceFormat::B8G8R8A8 ? 3 : 0;
    14 +static const int kARGBAlphaOffset = 0;  // Skia is always BGRA SurfaceFormat::A8R8G8B8_UINT32 == SurfaceFormat::B8G8R8A8 ? 3 : 0;
    14 +static const int kARGBAlphaOffset = 0;  // Skia is always BGRA SurfaceFormat::A8R8G8B8_UINT32 == SurfaceFormat::B8G8R8A8 ? 3 : 0;
    15  
    15  
    16  static bool VerifyRGBXFormat(uint8_t* aData, const IntSize& aSize,
    16  static bool VerifyRGBXFormat(uint8_t* aData, const IntSize& aSize,
    17                               const int32_t aStride, SurfaceFormat aFormat) {
    17                               const int32_t aStride, SurfaceFormat aFormat) {
    18 diff -r 051b75a600df gfx/2d/Types.h
    18 diff -r 83da7ee18178 gfx/2d/Types.h
    19 --- a/gfx/2d/Types.h	Fri Jul 05 12:42:44 2019 +0200
    19 --- a/gfx/2d/Types.h	Mon Jul 22 00:00:00 2019 +0200
    20 +++ b/gfx/2d/Types.h	Mon Jul 08 10:59:30 2019 +0200
    20 +++ b/gfx/2d/Types.h	Wed Jan 08 12:17:44 2020 +0100
    21 @@ -85,15 +85,8 @@
    21 @@ -86,15 +86,8 @@
    22  // The following values are endian-independent synonyms. The _UINT32 suffix
    22  // The following values are endian-independent synonyms. The _UINT32 suffix
    23  // indicates that the name reflects the layout when viewed as a uint32_t
    23  // indicates that the name reflects the layout when viewed as a uint32_t
    24  // value.
    24  // value.
    25 -#if MOZ_LITTLE_ENDIAN
    25 -#if MOZ_LITTLE_ENDIAN
    26    A8R8G8B8_UINT32 = B8G8R8A8,  // 0xAARRGGBB
    26    A8R8G8B8_UINT32 = B8G8R8A8,  // 0xAARRGGBB
    27    X8R8G8B8_UINT32 = B8G8R8X8   // 0x00RRGGBB
    27    X8R8G8B8_UINT32 = B8G8R8X8,  // 0x00RRGGBB
    28 -#elif MOZ_BIG_ENDIAN
    28 -#elif MOZ_BIG_ENDIAN
    29 -  A8R8G8B8_UINT32 = A8R8G8B8,  // 0xAARRGGBB
    29 -  A8R8G8B8_UINT32 = A8R8G8B8,  // 0xAARRGGBB
    30 -  X8R8G8B8_UINT32 = X8R8G8B8   // 0x00RRGGBB
    30 -  X8R8G8B8_UINT32 = X8R8G8B8,  // 0x00RRGGBB
    31 -#else
    31 -#else
    32 -#  error "bad endianness"
    32 -#  error "bad endianness"
    33 -#endif
    33 -#endif
    34  };
       
    35  
    34  
    36  static inline int BytesPerPixel(SurfaceFormat aFormat) {
    35    // The following values are OS and endian-independent synonyms.
    37 diff -r 051b75a600df gfx/skia/skia/third_party/skcms/skcms.cc
    36    //
    38 --- a/gfx/skia/skia/third_party/skcms/skcms.cc	Fri Jul 05 12:42:44 2019 +0200
    37 diff -r 83da7ee18178 gfx/skia/skia/third_party/skcms/skcms.cc
    39 +++ b/gfx/skia/skia/third_party/skcms/skcms.cc	Mon Jul 08 10:59:30 2019 +0200
    38 --- a/gfx/skia/skia/third_party/skcms/skcms.cc	Mon Jul 22 00:00:00 2019 +0200
    40 @@ -17,6 +17,8 @@
    39 +++ b/gfx/skia/skia/third_party/skcms/skcms.cc	Wed Jan 08 12:17:44 2020 +0100
    41      #include <arm_neon.h>
    40 @@ -30,6 +30,8 @@
    42  #elif defined(__SSE__)
    41          #include <avx512fintrin.h>
    43      #include <immintrin.h>
    42          #include <avx512dqintrin.h>
       
    43      #endif
    44 +#else
    44 +#else
    45 +    #define SKCMS_PORTABLE
    45 +    #define SKCMS_PORTABLE
    46  #endif
    46  #endif
    47  
    47  
    48  // sizeof(x) will return size_t, which is 32-bit on some machines and 64-bit on others.
    48  // sizeof(x) will return size_t, which is 32-bit on some machines and 64-bit on others.
    49 @@ -124,20 +126,28 @@
    49 @@ -280,20 +282,28 @@
    50  static uint16_t read_big_u16(const uint8_t* ptr) {
    50  static uint16_t read_big_u16(const uint8_t* ptr) {
    51      uint16_t be;
    51      uint16_t be;
    52      memcpy(&be, ptr, sizeof(be));
    52      memcpy(&be, ptr, sizeof(be));
    53 -#if defined(_MSC_VER)
    53 -#if defined(_MSC_VER)
    54 +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
    54 +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__