[Libreoffice-commits] core.git: external/skia
LuboÅ¡ LuÅák (via logerrit)
logerrit at kemper.freedesktop.org
Wed Mar 18 13:55:29 UTC 2020
external/skia/UnpackedTarball_skia.mk | 1 +
external/skia/windows-text-gamma.patch.0 | 28 ++++++++++++++++++++++++++++
2 files changed, 29 insertions(+)
New commits:
commit 1ad3f6b8d9e0ef1e921c3ed5526ea352d67265cf
Author: Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Wed Mar 18 12:10:29 2020 +0100
Commit: Luboš Luňák <l.lunak at collabora.com>
CommitDate: Wed Mar 18 14:55:03 2020 +0100
(do not) use SK_GAMMA_APPLY_TO_A8 also for Skia text on Windows
This is the Windows variant of the SK_GAMMA_APPLY_TO_A8 disabling,
again I don't quite understand why we need to disable this,
but with this patch Skia text rendering on Windows seems to be
pixel-perfect when compared with the VCL gen backend.
Change-Id: Iafc1e6353430e695dafa67d19eefd968d4f02ae2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90696
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
diff --git a/external/skia/UnpackedTarball_skia.mk b/external/skia/UnpackedTarball_skia.mk
index 58818a840e3d..fd05e8d5b3e3 100644
--- a/external/skia/UnpackedTarball_skia.mk
+++ b/external/skia/UnpackedTarball_skia.mk
@@ -30,6 +30,7 @@ skia_patches := \
clang-attributes-warning.patch.1 \
fontconfig-get-typeface.patch.0 \
windows-hfont-typeface.patch.0 \
+ windows-text-gamma.patch.0 \
$(eval $(call gb_UnpackedTarball_set_patchlevel,skia,1))
diff --git a/external/skia/windows-text-gamma.patch.0 b/external/skia/windows-text-gamma.patch.0
new file mode 100644
index 000000000000..366b67f15a65
--- /dev/null
+++ b/external/skia/windows-text-gamma.patch.0
@@ -0,0 +1,28 @@
+--- ./src/ports/SkFontHost_win.cpp.sav 2020-03-18 10:26:52.470184300 +0100
++++ ./src/ports/SkFontHost_win.cpp 2020-03-18 12:08:04.598406700 +0100
+@@ -1215,17 +1215,23 @@
+ // since the caller may require A8 for maskfilters, we can't check for BW
+ // ... until we have the caller tell us that explicitly
+ const SkGdiRGB* src = (const SkGdiRGB*)bits;
++#if defined(SK_GAMMA_APPLY_TO_A8)
+ if (fPreBlend.isApplicable()) {
+ RGBToA8<true>(src, srcRB, glyph, fPreBlend.fG);
+- } else {
++ } else
++#endif
++ {
+ RGBToA8<false>(src, srcRB, glyph, fPreBlend.fG);
+ }
+ } else { // LCD16
+ const SkGdiRGB* src = (const SkGdiRGB*)bits;
+ SkASSERT(SkMask::kLCD16_Format == glyph.fMaskFormat);
++#if defined(SK_GAMMA_APPLY_TO_A8)
+ if (fPreBlend.isApplicable()) {
+ RGBToLcd16<true>(src, srcRB, glyph, fPreBlend.fR, fPreBlend.fG, fPreBlend.fB);
+- } else {
++ } else
++#endif
++ {
+ RGBToLcd16<false>(src, srcRB, glyph, fPreBlend.fR, fPreBlend.fG, fPreBlend.fB);
+ }
+ }
More information about the Libreoffice-commits
mailing list