1 --- ./src/ports/SkFontHost_win.cpp 2024-10-04 15:24:40.448100018 +0200
2 +++ ./src/ports/SkFontHost_win.cpp 2024-10-04 15:26:22.284624363 +0200
3 @@ -1149,18 +1149,24 @@
4 // since the caller may require A8 for maskfilters, we can't check for BW
5 // ... until we have the caller tell us that explicitly
6 const SkGdiRGB* src = (const SkGdiRGB*)bits;
7 +#if defined(SK_GAMMA_APPLY_TO_A8)
8 if (fPreBlend.isApplicable()) {
9 RGBToA8<true>(src, srcRB, glyph, imageBuffer, fPreBlend.fG);
14 RGBToA8<false>(src, srcRB, glyph, imageBuffer, fPreBlend.fG);
17 const SkGdiRGB* src = (const SkGdiRGB*)bits;
18 SkASSERT(SkMask::kLCD16_Format == glyph.maskFormat());
19 +#if defined(SK_GAMMA_APPLY_TO_A8)
20 if (fPreBlend.isApplicable()) {
21 RGBToLcd16<true>(src, srcRB, glyph, imageBuffer,
22 fPreBlend.fR, fPreBlend.fG, fPreBlend.fB);
27 RGBToLcd16<false>(src, srcRB, glyph, imageBuffer,
28 fPreBlend.fR, fPreBlend.fG, fPreBlend.fB);
30 --- ./src/ports/SkScalerContext_win_dw.cpp 2024-10-04 15:24:40.448100018 +0200
31 +++ ./src/ports/SkScalerContext_win_dw.cpp 2024-10-04 15:29:29.810572073 +0200
32 @@ -2127,20 +2127,27 @@
33 BilevelToBW(src, glyph, imageBuffer);
34 } else if (!isLCD(fRec)) {
35 if (textureType == DWRITE_TEXTURE_ALIASED_1x1) {
36 +#if defined(SK_GAMMA_APPLY_TO_A8)
37 if (fPreBlend.isApplicable()) {
38 GrayscaleToA8<true>(src, glyph, imageBuffer, fPreBlend.fG);
43 GrayscaleToA8<false>(src, glyph, imageBuffer, fPreBlend.fG);
46 +#if defined(SK_GAMMA_APPLY_TO_A8)
47 if (fPreBlend.isApplicable()) {
48 RGBToA8<true>(src, glyph, imageBuffer, fPreBlend.fG);
53 RGBToA8<false>(src, glyph, imageBuffer, fPreBlend.fG);
57 SkASSERT(SkMask::kLCD16_Format == glyph.maskFormat());
58 +#if defined(SK_GAMMA_APPLY_TO_A8)
59 if (fPreBlend.isApplicable()) {
60 if (fRec.fFlags & SkScalerContext::kLCD_BGROrder_Flag) {
61 RGBToLcd16<true, false>(src, glyph, imageBuffer,
63 RGBToLcd16<true, true>(src, glyph, imageBuffer,
64 fPreBlend.fR, fPreBlend.fG, fPreBlend.fB);
70 if (fRec.fFlags & SkScalerContext::kLCD_BGROrder_Flag) {
71 RGBToLcd16<false, false>(src, glyph, imageBuffer,
72 fPreBlend.fR, fPreBlend.fG, fPreBlend.fB);