summaryrefslogtreecommitdiff
path: root/mozilla-bmo1504834-part1.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-08-01 16:23:41 +0000
committerCoprDistGit <infra@openeuler.org>2024-08-01 16:23:41 +0000
commitbac4e156d8d54aa3a82bc30d20c9234776631881 (patch)
treea3408825c9e3c0e6f300598835ea1f5d761bb5b4 /mozilla-bmo1504834-part1.patch
parentc368e7da13ec9d52b1ea63b59b0af1f8d8044fb8 (diff)
automatic import of firefoxopeneuler24.03_LTSopeneuler23.09
Diffstat (limited to 'mozilla-bmo1504834-part1.patch')
-rw-r--r--mozilla-bmo1504834-part1.patch86
1 files changed, 86 insertions, 0 deletions
diff --git a/mozilla-bmo1504834-part1.patch b/mozilla-bmo1504834-part1.patch
new file mode 100644
index 0000000..5246c5a
--- /dev/null
+++ b/mozilla-bmo1504834-part1.patch
@@ -0,0 +1,86 @@
+diff -up firefox-115.2.0/gfx/2d/DrawTargetSkia.cpp.mozilla-bmo1504834-part1 firefox-115.2.0/gfx/2d/DrawTargetSkia.cpp
+--- firefox-115.2.0/gfx/2d/DrawTargetSkia.cpp.mozilla-bmo1504834-part1 2023-09-20 22:15:11.850172571 +0200
++++ firefox-115.2.0/gfx/2d/DrawTargetSkia.cpp 2023-09-20 22:16:10.446147737 +0200
+@@ -156,8 +156,8 @@ static IntRect CalculateSurfaceBounds(co
+ }
+
+ static const int kARGBAlphaOffset =
+- SurfaceFormat::A8R8G8B8_UINT32 == SurfaceFormat::B8G8R8A8 ? 3 : 0;
+-
++ 0; // Skia is always BGRA SurfaceFormat::A8R8G8B8_UINT32 ==
++ // SurfaceFormat::B8G8R8A8 ? 3 : 0;
+ static bool VerifyRGBXFormat(uint8_t* aData, const IntSize& aSize,
+ const int32_t aStride, SurfaceFormat aFormat) {
+ if (aFormat != SurfaceFormat::B8G8R8X8 || aSize.IsEmpty()) {
+diff -up firefox-115.2.0/gfx/2d/Types.h.mozilla-bmo1504834-part1 firefox-115.2.0/gfx/2d/Types.h
+--- firefox-115.2.0/gfx/2d/Types.h.mozilla-bmo1504834-part1 2023-08-21 15:43:23.000000000 +0200
++++ firefox-115.2.0/gfx/2d/Types.h 2023-09-20 22:15:11.850172571 +0200
+@@ -89,18 +89,11 @@ enum class SurfaceFormat : int8_t {
+ // This represents the unknown format.
+ UNKNOWN, // TODO: Replace uses with Maybe<SurfaceFormat>.
+
+-// The following values are endian-independent synonyms. The _UINT32 suffix
+-// indicates that the name reflects the layout when viewed as a uint32_t
+-// value.
+-#if MOZ_LITTLE_ENDIAN()
++ // The following values are endian-independent synonyms. The _UINT32 suffix
++ // indicates that the name reflects the layout when viewed as a uint32_t
++ // value.
+ A8R8G8B8_UINT32 = B8G8R8A8, // 0xAARRGGBB
+ X8R8G8B8_UINT32 = B8G8R8X8, // 0x00RRGGBB
+-#elif MOZ_BIG_ENDIAN()
+- A8R8G8B8_UINT32 = A8R8G8B8, // 0xAARRGGBB
+- X8R8G8B8_UINT32 = X8R8G8B8, // 0x00RRGGBB
+-#else
+-# error "bad endianness"
+-#endif
+
+ // The following values are OS and endian-independent synonyms.
+ //
+diff -up firefox-115.2.0/gfx/skia/skia/modules/skcms/skcms.cc.mozilla-bmo1504834-part1 firefox-115.2.0/gfx/skia/skia/modules/skcms/skcms.cc
+--- firefox-115.2.0/gfx/skia/skia/modules/skcms/skcms.cc.mozilla-bmo1504834-part1 2023-08-21 15:43:23.000000000 +0200
++++ firefox-115.2.0/gfx/skia/skia/modules/skcms/skcms.cc 2023-09-20 22:15:11.851172570 +0200
+@@ -30,6 +30,8 @@
+ #include <avx512fintrin.h>
+ #include <avx512dqintrin.h>
+ #endif
++#else
++ #define SKCMS_PORTABLE
+ #endif
+
+ static bool runtime_cpu_detection = true;
+@@ -324,20 +326,28 @@ enum {
+ static uint16_t read_big_u16(const uint8_t* ptr) {
+ uint16_t be;
+ memcpy(&be, ptr, sizeof(be));
+-#if defined(_MSC_VER)
+- return _byteswap_ushort(be);
++#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
++ return be;
+ #else
+- return __builtin_bswap16(be);
++ #if defined(_MSC_VER)
++ return _byteswap_ushort(be);
++ #else
++ return __builtin_bswap16(be);
++ #endif
+ #endif
+ }
+
+ static uint32_t read_big_u32(const uint8_t* ptr) {
+ uint32_t be;
+ memcpy(&be, ptr, sizeof(be));
+-#if defined(_MSC_VER)
+- return _byteswap_ulong(be);
++#if __BYTE_ORDER == __ORDER_BIG_ENDIAN__
++ return be;
+ #else
+- return __builtin_bswap32(be);
++ #if defined(_MSC_VER)
++ return _byteswap_ulong(be);
++ #else
++ return __builtin_bswap32(be);
++ #endif
+ #endif
+ }
+