branch | firefox74 |
changeset 1123 | 7fa561e5d7c7 |
parent 1108 | 33b03cfb3747 |
child 1190 | 2a24a948b5cf |
1122:a9cd24eaa361 | 1123:7fa561e5d7c7 |
---|---|
1 # HG changeset patch |
1 # HG changeset patch |
2 # Parent aecb4600e5da17443b224c79eee178c1d8e155e3 |
2 # Parent d1d66f7e4d0e7fd45e91e4fcee07555e72046d48 |
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 gfx/skia/skia/include/private/SkNx.h |
6 diff --git a/gfx/skia/skia/include/private/SkNx.h b/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 |
8 +++ b/gfx/skia/skia/include/private/SkNx.h Mon Sep 09 10:04:06 2019 +0200 |
8 +++ b/gfx/skia/skia/include/private/SkNx.h |
9 @@ -238,7 +238,18 @@ |
9 @@ -233,17 +233,28 @@ struct SkNx<1,T> { |
10 AI SkNx operator<<(int bits) const { return fVal << bits; } |
|
11 AI SkNx operator>>(int bits) const { return fVal >> bits; } |
|
12 |
|
13 AI SkNx operator+(const SkNx& y) const { return fVal + y.fVal; } |
|
14 AI SkNx operator-(const SkNx& y) const { return fVal - y.fVal; } |
|
10 AI SkNx operator*(const SkNx& y) const { return fVal * y.fVal; } |
15 AI SkNx operator*(const SkNx& y) const { return fVal * y.fVal; } |
11 AI SkNx operator/(const SkNx& y) const { return fVal / y.fVal; } |
16 AI SkNx operator/(const SkNx& y) const { return fVal / y.fVal; } |
12 |
17 |
13 + // On Big endian the commented out variant doesn't work, |
18 + // On Big endian the commented out variant doesn't work, |
14 + // and honestly, I have no idea why it exists in the first place. |
19 + // and honestly, I have no idea why it exists in the first place. |
23 AI SkNx operator&(const SkNx& y) const { return FromBits(ToBits(fVal) & ToBits(y.fVal)); } |
28 AI SkNx operator&(const SkNx& y) const { return FromBits(ToBits(fVal) & ToBits(y.fVal)); } |
24 +#endif |
29 +#endif |
25 AI SkNx operator|(const SkNx& y) const { return FromBits(ToBits(fVal) | ToBits(y.fVal)); } |
30 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)); } |
31 AI SkNx operator^(const SkNx& y) const { return FromBits(ToBits(fVal) ^ ToBits(y.fVal)); } |
27 |
32 |
28 diff -r aecb4600e5da gfx/skia/skia/src/opts/SkBlitMask_opts.h |
33 AI SkNx operator==(const SkNx& y) const { return FromBits(fVal == y.fVal ? ~0 : 0); } |
29 --- a/gfx/skia/skia/src/opts/SkBlitMask_opts.h Tue Aug 20 09:46:55 2019 +0200 |
34 AI SkNx operator!=(const SkNx& y) const { return FromBits(fVal != y.fVal ? ~0 : 0); } |
30 +++ b/gfx/skia/skia/src/opts/SkBlitMask_opts.h Mon Sep 09 10:04:06 2019 +0200 |
35 AI SkNx operator<=(const SkNx& y) const { return FromBits(fVal <= y.fVal ? ~0 : 0); } |
31 @@ -203,7 +203,13 @@ |
36 AI SkNx operator>=(const SkNx& y) const { return FromBits(fVal >= y.fVal ? ~0 : 0); } |
37 AI SkNx operator< (const SkNx& y) const { return FromBits(fVal < y.fVal ? ~0 : 0); } |
|
38 diff --git a/gfx/skia/skia/src/opts/SkBlitMask_opts.h b/gfx/skia/skia/src/opts/SkBlitMask_opts.h |
|
39 --- a/gfx/skia/skia/src/opts/SkBlitMask_opts.h |
|
40 +++ b/gfx/skia/skia/src/opts/SkBlitMask_opts.h |
|
41 @@ -198,17 +198,23 @@ namespace SK_OPTS_NS { |
|
42 const SkAlpha* mask, size_t maskRB, |
|
43 int w, int h) { |
|
44 auto fn = [](const Sk4px& d, const Sk4px& aa) { |
|
45 // = (s + d(1-sa))aa + d(1-aa) |
|
46 // = s*aa + d(1-sa*aa) |
|
32 // ~~~> |
47 // ~~~> |
33 // a = 1*aa + d(1-1*aa) = aa + d(1-aa) |
48 // a = 1*aa + d(1-1*aa) = aa + d(1-aa) |
34 // c = 0*aa + d(1-1*aa) = d(1-aa) |
49 // c = 0*aa + d(1-1*aa) = d(1-aa) |
35 + |
50 + |
36 + // For big endian we have to swap the alpha-mask from 0,0,0,255 to 255,0,0,0 |
51 + // For big endian we have to swap the alpha-mask from 0,0,0,255 to 255,0,0,0 |
40 return Sk4px(Sk16b(aa) & Sk16b(0,0,0,255, 0,0,0,255, 0,0,0,255, 0,0,0,255)) |
55 return Sk4px(Sk16b(aa) & Sk16b(0,0,0,255, 0,0,0,255, 0,0,0,255, 0,0,0,255)) |
41 +#endif |
56 +#endif |
42 + d.approxMulDiv255(aa.inv()); |
57 + d.approxMulDiv255(aa.inv()); |
43 }; |
58 }; |
44 while (h --> 0) { |
59 while (h --> 0) { |
60 Sk4px::MapDstAlpha(w, dst, mask, fn); |
|
61 dst += dstRB / sizeof(*dst); |
|
62 mask += maskRB / sizeof(*mask); |
|
63 } |
|
64 } |