diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:54:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:54:39 +0000 |
commit | 267c6f2ac71f92999e969232431ba04678e7437e (patch) | |
tree | 358c9467650e1d0a1d7227a21dac2e3d08b622b2 /external/skia/windows-text-gamma.patch.0 | |
parent | Initial commit. (diff) | |
download | libreoffice-267c6f2ac71f92999e969232431ba04678e7437e.tar.xz libreoffice-267c6f2ac71f92999e969232431ba04678e7437e.zip |
Adding upstream version 4:24.2.0.upstream/4%24.2.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'external/skia/windows-text-gamma.patch.0')
-rw-r--r-- | external/skia/windows-text-gamma.patch.0 | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/external/skia/windows-text-gamma.patch.0 b/external/skia/windows-text-gamma.patch.0 new file mode 100644 index 0000000000..624636b7da --- /dev/null +++ b/external/skia/windows-text-gamma.patch.0 @@ -0,0 +1,70 @@ +--- ./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); + } + } +--- ./src/ports/SkScalerContext_win_dw.cpp ++++ ./src/ports/SkScalerContext_win_dw.cpp +@@ -1132,27 +1132,36 @@ void SkScalerContext_DW::generateImage(const SkGlyph& glyph) { + BilevelToBW(src, glyph); + } else if (!isLCD(fRec)) { + if (textureType == DWRITE_TEXTURE_ALIASED_1x1) { ++#if defined(SK_GAMMA_APPLY_TO_A8) + if (fPreBlend.isApplicable()) { + GrayscaleToA8<true>(src, glyph, fPreBlend.fG); +- } else { ++ } else ++#endif ++ { + GrayscaleToA8<false>(src, glyph, fPreBlend.fG); + } + } else { ++#if defined(SK_GAMMA_APPLY_TO_A8) + if (fPreBlend.isApplicable()) { + RGBToA8<true>(src, glyph, fPreBlend.fG); +- } else { ++ } else ++#endif ++ { + RGBToA8<false>(src, glyph, fPreBlend.fG); + } + } + } else { + SkASSERT(SkMask::kLCD16_Format == glyph.fMaskFormat); ++#if defined(SK_GAMMA_APPLY_TO_A8) + if (fPreBlend.isApplicable()) { + if (fRec.fFlags & SkScalerContext::kLCD_BGROrder_Flag) { + RGBToLcd16<true, false>(src, glyph, fPreBlend.fR, fPreBlend.fG, fPreBlend.fB); + } else { + RGBToLcd16<true, true>(src, glyph, fPreBlend.fR, fPreBlend.fG, fPreBlend.fB); + } +- } else { ++ } else ++#endif ++ { + if (fRec.fFlags & SkScalerContext::kLCD_BGROrder_Flag) { + RGBToLcd16<false, false>(src, glyph, fPreBlend.fR, fPreBlend.fG, fPreBlend.fB); + } else { |