The previous code would also set 'grayscale' for aliased which would
then cause the code to use the new renderer, which has issues with
aliased glyphs.
BUG=skia:5416
Change-Id: Ia856322b59d0eba258522d73c3a4d827ab4429e1
Reviewed-on: https://skia-review.googlesource.com/9834
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
fAntiAliasMode = DWRITE_TEXT_ANTIALIAS_MODE_CLEARTYPE;
#ifndef SK_IGNORE_DW_GRAY_FIX
if (typeface->fFactory2 && typeface->fDWriteFontFace2 &&
- !isLCD(fRec) && !(fRec.fFlags & SkScalerContext::kGenA8FromLCD_Flag))
+ SkMask::kA8_Format == fRec.fMaskFormat &&
+ !(fRec.fFlags & SkScalerContext::kGenA8FromLCD_Flag))
{
// DWRITE_TEXTURE_ALIASED_1x1 is now misnamed, it must also be used with grayscale.
fTextureType = DWRITE_TEXTURE_ALIASED_1x1;