summaryrefslogtreecommitdiff
path: root/experimental/firefox-esr/endian-gfx.patch
diff options
context:
space:
mode:
Diffstat (limited to 'experimental/firefox-esr/endian-gfx.patch')
-rw-r--r--experimental/firefox-esr/endian-gfx.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/experimental/firefox-esr/endian-gfx.patch b/experimental/firefox-esr/endian-gfx.patch
new file mode 100644
index 000000000..ec81a9cee
--- /dev/null
+++ b/experimental/firefox-esr/endian-gfx.patch
@@ -0,0 +1,32 @@
+
+# HG changeset patch
+# User Lee Salzman <lsalzman@mozilla.com>
+# Date 1540234148 14400
+# Node ID f0f7573deea111d97bc96aa6b33e2518ee89da3a
+# Parent 2ce8f6d1a64ef8ee845c595bc441234af72422fe
+Bug 1500709 - fix big-endian RGBBitShift in Swizzle. r=me
+CLOSED TREE
+
+diff --git a/gfx/2d/Swizzle.cpp b/gfx/2d/Swizzle.cpp
+--- a/gfx/2d/Swizzle.cpp
++++ b/gfx/2d/Swizzle.cpp
+@@ -82,17 +82,17 @@ AlphaByteIndex(SurfaceFormat aFormat)
+
+ // The endian-dependent bit shift to access RGB of a UINT32 pixel.
+ static constexpr uint32_t
+ RGBBitShift(SurfaceFormat aFormat)
+ {
+ #if MOZ_LITTLE_ENDIAN
+ return 8 * RGBByteIndex(aFormat);
+ #else
+- return 24 - 8 * RGBByteIndex(aFormat);
++ return 8 - 8 * RGBByteIndex(aFormat);
+ #endif
+ }
+
+ // The endian-dependent bit shift to access alpha of a UINT32 pixel.
+ static constexpr uint32_t
+ AlphaBitShift(SurfaceFormat aFormat)
+ {
+ return (RGBBitShift(aFormat) + 24) % 32;
+