static void adjustTextRenderMode(SkPaint* paint, PlatformContextSkia* skiaContext) { // Our layers only have a single alpha channel. This means that subpixel // rendered text cannot be compositied correctly when the layer is // collapsed. Therefore, subpixel text is disabled when we are drawing // onto a layer or when the compositor is being used. if (isCanvasMultiLayered(skiaContext->canvas()) || skiaContext->isDrawingToImageBuffer()) paint->setLCDRenderText(false); }
// lifted from FontSkia.cpp static bool disableTextLCD(PlatformContextSkia* skiaContext) { // Our layers only have a single alpha channel. This means that subpixel // rendered text cannot be compositied correctly when the layer is // collapsed. Therefore, subpixel text is disabled when we are drawing // onto a layer or when the compositor is being used. return isCanvasMultiLayered(skiaContext->canvas()) || skiaContext->isDrawingToImageBuffer(); }