external/skia/UnpackedTarball_skia.mk    |    1 
 external/skia/windows-text-gamma.patch.0 |   72 -------------------------------
 2 files changed, 73 deletions(-)

New commits:
commit bfa28a257ae621747dddbb61f228705cf46079b8
Author:     Jonathan Clark <jonat...@libreoffice.org>
AuthorDate: Wed Jul 2 14:27:58 2025 -0600
Commit:     Jonathan Clark <jonat...@libreoffice.org>
CommitDate: Thu Jul 3 01:22:13 2025 +0200

    tdf#166339 vcl: Removed Windows skia text gamma patch
    
    Reverts the following commit:
    
    commit 1ad3f6b8d9e0ef1e921c3ed5526ea352d67265cf
    Date:   Wed Mar 18 12:10:29 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.
    
    The patch added by this commit disabled gamma correction for text
    rendered by Skia under Windows. Disabling gamma-correct rendering causes
    nasty artifacts, like fringing or text appearing as the wrong weight.
    
    Change-Id: I9116712f47e22398259ecc93b165879f0cf29563
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187290
    Tested-by: Jenkins
    Reviewed-by: Jonathan Clark <jonat...@libreoffice.org>

diff --git a/external/skia/UnpackedTarball_skia.mk 
b/external/skia/UnpackedTarball_skia.mk
index 5bdf7a10a467..cf2cd6c99b8d 100644
--- a/external/skia/UnpackedTarball_skia.mk
+++ b/external/skia/UnpackedTarball_skia.mk
@@ -21,7 +21,6 @@ skia_patches := \
     clang-attributes-warning.patch.1 \
     fontconfig-get-typeface.patch.1 \
     windows-do-not-modify-logfont.patch.0 \
-    windows-text-gamma.patch.0 \
     windows-force-unicode-api.patch.0 \
     fix-without-gl.patch.1 \
     windows-typeface-directwrite.patch.1 \
diff --git a/external/skia/windows-text-gamma.patch.0 
b/external/skia/windows-text-gamma.patch.0
deleted file mode 100644
index aad89597a447..000000000000
--- a/external/skia/windows-text-gamma.patch.0
+++ /dev/null
@@ -1,72 +0,0 @@
---- ./src/ports/SkFontHost_win.cpp     2024-10-04 15:24:40.448100018 +0200
-+++ ./src/ports/SkFontHost_win.cpp     2024-10-04 15:26:22.284624363 +0200
-@@ -1149,18 +1149,24 @@
-         // 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, imageBuffer, fPreBlend.fG);
--        } else {
-+        } else
-+#endif
-+        {
-             RGBToA8<false>(src, srcRB, glyph, imageBuffer, fPreBlend.fG);
-         }
-     } else {    // LCD16
-         const SkGdiRGB* src = (const SkGdiRGB*)bits;
-         SkASSERT(SkMask::kLCD16_Format == glyph.maskFormat());
-+#if defined(SK_GAMMA_APPLY_TO_A8)
-         if (fPreBlend.isApplicable()) {
-             RGBToLcd16<true>(src, srcRB, glyph, imageBuffer,
-                              fPreBlend.fR, fPreBlend.fG, fPreBlend.fB);
--        } else {
-+        } else
-+#endif
-+        {
-             RGBToLcd16<false>(src, srcRB, glyph, imageBuffer,
-                               fPreBlend.fR, fPreBlend.fG, fPreBlend.fB);
-         }
---- ./src/ports/SkScalerContext_win_dw.cpp     2024-10-04 15:24:40.448100018 
+0200
-+++ ./src/ports/SkScalerContext_win_dw.cpp     2024-10-04 15:29:29.810572073 
+0200
-@@ -2127,20 +2127,27 @@
-         BilevelToBW(src, glyph, imageBuffer);
-     } else if (!isLCD(fRec)) {
-         if (textureType == DWRITE_TEXTURE_ALIASED_1x1) {
-+#if defined(SK_GAMMA_APPLY_TO_A8)
-             if (fPreBlend.isApplicable()) {
-                 GrayscaleToA8<true>(src, glyph, imageBuffer, fPreBlend.fG);
--            } else {
-+            } else
-+#endif
-+            {
-                 GrayscaleToA8<false>(src, glyph, imageBuffer, fPreBlend.fG);
-             }
-         } else {
-+#if defined(SK_GAMMA_APPLY_TO_A8)
-             if (fPreBlend.isApplicable()) {
-                 RGBToA8<true>(src, glyph, imageBuffer, fPreBlend.fG);
--            } else {
-+            } else
-+#endif
-+            {
-                 RGBToA8<false>(src, glyph, imageBuffer, fPreBlend.fG);
-             }
-         }
-     } else {
-         SkASSERT(SkMask::kLCD16_Format == glyph.maskFormat());
-+#if defined(SK_GAMMA_APPLY_TO_A8)
-         if (fPreBlend.isApplicable()) {
-             if (fRec.fFlags & SkScalerContext::kLCD_BGROrder_Flag) {
-                 RGBToLcd16<true, false>(src, glyph, imageBuffer,
-@@ -2149,7 +2156,9 @@
-                 RGBToLcd16<true, true>(src, glyph, imageBuffer,
-                                        fPreBlend.fR, fPreBlend.fG, 
fPreBlend.fB);
-             }
--        } else {
-+        } else
-+#endif
-+        {
-             if (fRec.fFlags & SkScalerContext::kLCD_BGROrder_Flag) {
-                 RGBToLcd16<false, false>(src, glyph, imageBuffer,
-                                          fPreBlend.fR, fPreBlend.fG, 
fPreBlend.fB);

Reply via email to