Index: Source/platform/fonts/harfbuzz/FontHarfBuzz.cpp |
diff --git a/Source/platform/fonts/harfbuzz/FontHarfBuzz.cpp b/Source/platform/fonts/harfbuzz/FontHarfBuzz.cpp |
index f7c6289cb1d54ec33e32e6259b54b30accd02818..96e44fd100f24b7d31cf63a98e17df2e9d46c8ef 100644 |
--- a/Source/platform/fonts/harfbuzz/FontHarfBuzz.cpp |
+++ b/Source/platform/fonts/harfbuzz/FontHarfBuzz.cpp |
@@ -206,17 +206,11 @@ void Font::drawTextBlob(GraphicsContext* gc, const SkTextBlob* blob, const SkPoi |
// See also paintGlyphs. |
TextDrawingModeFlags textMode = gc->textDrawingMode(); |
- if (textMode & TextModeFill) { |
- SkPaint paint = gc->fillPaint(); |
- gc->adjustTextRenderMode(&paint); |
- paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding); |
- gc->drawTextBlob(blob, origin, paint); |
- } |
+ if (textMode & TextModeFill) |
+ gc->drawTextBlob(blob, origin, gc->fillPaint()); |
if ((textMode & TextModeStroke) && gc->hasStroke()) { |
SkPaint paint = gc->strokePaint(); |
- gc->adjustTextRenderMode(&paint); |
- paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding); |
if (textMode & TextModeFill) |
paint.setLooper(0); |
gc->drawTextBlob(blob, origin, paint); |
@@ -299,7 +293,8 @@ FloatRect Font::selectionRectForComplexText(const TextRun& run, |
return shaper.selectionRect(point, height, from, to); |
} |
-PassTextBlobPtr Font::buildTextBlob(const GlyphBuffer& glyphBuffer, float initialAdvance, const FloatRect& bounds, float& advance) const |
+PassTextBlobPtr Font::buildTextBlob(const GlyphBuffer& glyphBuffer, float initialAdvance, |
+ const FloatRect& bounds, float& advance, bool couldUseLCD) const |
{ |
// FIXME: Except for setupPaint, this is not specific to FontHarfBuzz. |
// FIXME: Also implement the more general full-positioning path. |
@@ -328,6 +323,9 @@ PassTextBlobPtr Font::buildTextBlob(const GlyphBuffer& glyphBuffer, float initia |
fontData->platformData().setupPaint(&paint); |
paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding); |
+ // FIXME: this should go away after the big LCD cleanup. |
+ paint.setLCDRenderText(paint.isLCDRenderText() && couldUseLCD); |
+ |
unsigned start = i++; |
while (i < glyphBuffer.size() && glyphBuffer.fontDataAt(i) == fontData) |
i++; |