CG smoothing implies gamma blit.
There are three distinct attributes controlled by font smoothing,
subpixel converage, fake bolding, and gamma 2 blitting. In macOS 14 the
subpixel coverage was removed but the other two apparently remain. Prior
to this change the code had assumed that the gamma 2 blitting had also
been removed, but this appears not to be the case.
Bug: chromium:901611
Reviewed-on: https://skia-review.googlesource.com/c/177880
Reviewed-by: Herb Derby <herb@google.com>
Change-Id: I4da500e19066efefb27825f537bc5359375e7ebe
Cherry-pick: 16d00eeef7d18dcfd28725bcb4c15dad633ab7eb
Approval: https://crbug.com/901611#c22
Reviewed-on: https://skia-review.googlesource.com/c/178266
Reviewed-by: Ben Wagner <bungeman@google.com>
diff --git a/src/ports/SkFontHost_mac.cpp b/src/ports/SkFontHost_mac.cpp
index d31916d..aa79033 100644
--- a/src/ports/SkFontHost_mac.cpp
+++ b/src/ports/SkFontHost_mac.cpp
@@ -1334,7 +1334,7 @@
if ((glyph.fMaskFormat == SkMask::kLCD16_Format) ||
(glyph.fMaskFormat == SkMask::kA8_Format
&& requestSmooth
- && smooth_behavior() == SmoothBehavior::subpixel))
+ && smooth_behavior() != SmoothBehavior::none))
{
const uint8_t* linear = gLinearCoverageFromCGLCDValue.data();