|
|
3262b1 |
# HG changeset patch
|
|
|
3262b1 |
# Parent aecb4600e5da17443b224c79eee178c1d8e155e3
|
|
|
3262b1 |
For FF68, AntiAliasing of XULTexts seem to be broken on big endian (s390x). Text and icons of the sandwich-menu to the
|
|
|
3262b1 |
right of the address bar, as well as plugin-windows appears transparant, which usually means unreadable (white on white).
|
|
|
3262b1 |
|
|
|
3262b1 |
diff -r aecb4600e5da gfx/skia/skia/include/private/SkNx.h
|
|
|
3262b1 |
--- a/gfx/skia/skia/include/private/SkNx.h Tue Aug 20 09:46:55 2019 +0200
|
|
|
3262b1 |
+++ b/gfx/skia/skia/include/private/SkNx.h Mon Sep 09 10:04:06 2019 +0200
|
|
|
3262b1 |
@@ -238,7 +238,18 @@
|
|
|
3262b1 |
AI SkNx operator*(const SkNx& y) const { return fVal * y.fVal; }
|
|
|
3262b1 |
AI SkNx operator/(const SkNx& y) const { return fVal / y.fVal; }
|
|
|
3262b1 |
|
|
|
3262b1 |
+ // On Big endian the commented out variant doesn't work,
|
|
|
3262b1 |
+ // and honestly, I have no idea why it exists in the first place.
|
|
|
3262b1 |
+ // The reason its broken is, I think, that it defaults to the double-variant of ToBits()
|
|
|
3262b1 |
+ // which gets a 64-bit integer, and FromBits returns 32-bit,
|
|
|
3262b1 |
+ // cutting off the wrong half again.
|
|
|
3262b1 |
+ // Overall, I see no reason to have ToBits and FromBits at all (even for floats/doubles).
|
|
|
3262b1 |
+ // Still we are only "fixing" this for big endian and leave little endian alone (never touch a running system)
|
|
|
3262b1 |
+#ifdef SK_CPU_BENDIAN
|
|
|
3262b1 |
+ AI SkNx operator&(const SkNx& y) const { return fVal & y.fVal; }
|
|
|
3262b1 |
+#else
|
|
|
3262b1 |
AI SkNx operator&(const SkNx& y) const { return FromBits(ToBits(fVal) & ToBits(y.fVal)); }
|
|
|
3262b1 |
+#endif
|
|
|
3262b1 |
AI SkNx operator|(const SkNx& y) const { return FromBits(ToBits(fVal) | ToBits(y.fVal)); }
|
|
|
3262b1 |
AI SkNx operator^(const SkNx& y) const { return FromBits(ToBits(fVal) ^ ToBits(y.fVal)); }
|
|
|
3262b1 |
|
|
|
3262b1 |
diff -r aecb4600e5da gfx/skia/skia/src/opts/SkBlitMask_opts.h
|
|
|
3262b1 |
--- a/gfx/skia/skia/src/opts/SkBlitMask_opts.h Tue Aug 20 09:46:55 2019 +0200
|
|
|
3262b1 |
+++ b/gfx/skia/skia/src/opts/SkBlitMask_opts.h Mon Sep 09 10:04:06 2019 +0200
|
|
|
3262b1 |
@@ -203,7 +203,13 @@
|
|
|
3262b1 |
// ~~~>
|
|
|
3262b1 |
// a = 1*aa + d(1-1*aa) = aa + d(1-aa)
|
|
|
3262b1 |
// c = 0*aa + d(1-1*aa) = d(1-aa)
|
|
|
3262b1 |
+
|
|
|
3262b1 |
+ // For big endian we have to swap the alpha-mask from 0,0,0,255 to 255,0,0,0
|
|
|
3262b1 |
+#ifdef SK_CPU_BENDIAN
|
|
|
3262b1 |
+ return Sk4px(Sk16b(aa) & Sk16b(255,0,0,0, 255,0,0,0, 255,0,0,0, 255,0,0,0))
|
|
|
3262b1 |
+#else
|
|
|
3262b1 |
return Sk4px(Sk16b(aa) & Sk16b(0,0,0,255, 0,0,0,255, 0,0,0,255, 0,0,0,255))
|
|
|
3262b1 |
+#endif
|
|
|
3262b1 |
+ d.approxMulDiv255(aa.inv());
|
|
|
3262b1 |
};
|
|
|
3262b1 |
while (h --> 0) {
|