Bug 1260454. Disable LCD font smoothing if we have grayscale AA on OS X. r=lsalzman

This commit is contained in:
Mason Chang 2016-04-21 08:45:14 -07:00
Родитель 6993c1da0e
Коммит 68c6d918e5
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -636,8 +636,10 @@ DrawTargetSkia::FillGlyphs(ScaledFont *aFont,
// SkFontHost_cairo does not support subpixel text, so only enable it for other font hosts.
paint.mPaint.setSubpixelText(true);
if (aFont->GetType() == FontType::MAC && shouldLCDRenderText) {
if (aFont->GetType() == FontType::MAC) {
// SkFontHost_mac only supports subpixel antialiasing when hinting is turned off.
// For grayscale AA, we want to disable font smoothing as the only time we should
// use grayscale AA is with explicit -moz-osx-font-smoothing
paint.mPaint.setHinting(SkPaint::kNo_Hinting);
} else {
paint.mPaint.setHinting(SkPaint::kNormal_Hinting);