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..2e0fa0a38d5cfb4d6b032559be19baa16435c891 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, const GraphicsContext& context, |
+ float initialAdvance, const FloatRect& bounds, float& advance) const |
{ |
// FIXME: Except for setupPaint, this is not specific to FontHarfBuzz. |
// FIXME: Also implement the more general full-positioning path. |
@@ -326,6 +321,7 @@ PassTextBlobPtr Font::buildTextBlob(const GlyphBuffer& glyphBuffer, float initia |
// to avoid correctness problems here. |
SkPaint paint; |
fontData->platformData().setupPaint(&paint); |
+ context.adjustTextRenderMode(&paint); |
jbroman
2014/09/10 17:09:40
When can these properties of the GraphicsContext c
|
paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding); |
unsigned start = i++; |