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