summaryrefslogtreecommitdiff
path: root/www/librewolf/files/patch-bug1504834_comment9
diff options
context:
space:
mode:
authorMartin Filla <freebsd@sysctl.cz>2023-01-19 19:52:57 +0100
committerJesper Schmitz Mouridsen <jsm@FreeBSD.org>2023-01-21 19:34:48 +0100
commit4e77dee79c17245e0c3b4b98af5a718ed2c5eb81 (patch)
tree1af2a1c76c0c6d33307e7456f888546cf0ded567 /www/librewolf/files/patch-bug1504834_comment9
parentsecurity/openscep: Mark DEPRECATED (diff)
www/librewolf: New port
PR: 258503
Diffstat (limited to 'www/librewolf/files/patch-bug1504834_comment9')
-rw-r--r--www/librewolf/files/patch-bug1504834_comment949
1 files changed, 49 insertions, 0 deletions
diff --git a/www/librewolf/files/patch-bug1504834_comment9 b/www/librewolf/files/patch-bug1504834_comment9
new file mode 100644
index 000000000000..c3d149ffa37b
--- /dev/null
+++ b/www/librewolf/files/patch-bug1504834_comment9
@@ -0,0 +1,49 @@
+https://bugzilla.mozilla.org/show_bug.cgi?id=1504834#c9
+https://bugzilla.mozilla.org/attachment.cgi?id=9111146
+mozilla-bmo1504834-part3.patch
+
+
+# HG changeset patch
+# Parent aecb4600e5da17443b224c79eee178c1d8e155e3
+For FF68, AntiAliasing of XULTexts seem to be broken on big endian (s390x). Text and icons of the sandwich-menu to the
+right of the address bar, as well as plugin-windows appears transparant, which usually means unreadable (white on white).
+
+diff -r aecb4600e5da gfx/skia/skia/include/private/SkNx.h
+--- gfx/skia/skia/include/private/SkNx.h Tue Aug 20 09:46:55 2019 +0200
++++ gfx/skia/skia/include/private/SkNx.h Mon Sep 09 10:04:06 2019 +0200
+@@ -238,7 +238,18 @@
+ AI SkNx operator*(const SkNx& y) const { return fVal * y.fVal; }
+ AI SkNx operator/(const SkNx& y) const { return fVal / y.fVal; }
+
++ // On Big endian the commented out variant doesn't work,
++ // and honestly, I have no idea why it exists in the first place.
++ // The reason its broken is, I think, that it defaults to the double-variant of ToBits()
++ // which gets a 64-bit integer, and FromBits returns 32-bit,
++ // cutting off the wrong half again.
++ // Overall, I see no reason to have ToBits and FromBits at all (even for floats/doubles).
++ // Still we are only "fixing" this for big endian and leave little endian alone (never touch a running system)
++#ifdef SK_CPU_BENDIAN
++ AI SkNx operator&(const SkNx& y) const { return fVal & y.fVal; }
++#else
+ AI SkNx operator&(const SkNx& y) const { return FromBits(ToBits(fVal) & ToBits(y.fVal)); }
++#endif
+ AI SkNx operator|(const SkNx& y) const { return FromBits(ToBits(fVal) | ToBits(y.fVal)); }
+ AI SkNx operator^(const SkNx& y) const { return FromBits(ToBits(fVal) ^ ToBits(y.fVal)); }
+
+diff -r aecb4600e5da gfx/skia/skia/src/opts/SkBlitMask_opts.h
+--- gfx/skia/skia/src/opts/SkBlitMask_opts.h Tue Aug 20 09:46:55 2019 +0200
++++ gfx/skia/skia/src/opts/SkBlitMask_opts.h Mon Sep 09 10:04:06 2019 +0200
+@@ -203,7 +203,13 @@
+ // ~~~>
+ // a = 1*aa + d(1-1*aa) = aa + d(1-aa)
+ // c = 0*aa + d(1-1*aa) = d(1-aa)
++
++ // For big endian we have to swap the alpha-mask from 0,0,0,255 to 255,0,0,0
++#ifdef SK_CPU_BENDIAN
++ return Sk4px(Sk16b(aa) & Sk16b(255,0,0,0, 255,0,0,0, 255,0,0,0, 255,0,0,0))
++#else
+ return Sk4px(Sk16b(aa) & Sk16b(0,0,0,255, 0,0,0,255, 0,0,0,255, 0,0,0,255))
++#endif
+ + d.approxMulDiv255(aa.inv());
+ };
+ while (h --> 0) {