| Index: Source/core/platform/graphics/harfbuzz/FontHarfBuzz.cpp
|
| diff --git a/Source/core/platform/graphics/harfbuzz/FontHarfBuzz.cpp b/Source/core/platform/graphics/harfbuzz/FontHarfBuzz.cpp
|
| index 10fe78ee2b4600cf4081e6a15fd1d466300e77c2..2057ba3665ec6610ced1365a8a93b3f6ba5f15d2 100644
|
| --- a/Source/core/platform/graphics/harfbuzz/FontHarfBuzz.cpp
|
| +++ b/Source/core/platform/graphics/harfbuzz/FontHarfBuzz.cpp
|
| @@ -60,7 +60,7 @@ bool Font::canExpandAroundIdeographsInComplexText()
|
|
|
| void Font::drawGlyphs(GraphicsContext* gc, const SimpleFontData* font,
|
| const GlyphBuffer& glyphBuffer, int from, int numGlyphs,
|
| - const FloatPoint& point) const {
|
| + const FloatPoint& point, const FloatRect& textRect) const {
|
| SkASSERT(sizeof(GlyphBufferGlyph) == sizeof(uint16_t)); // compile-time assert
|
|
|
| const GlyphBufferGlyph* glyphs = glyphBuffer.glyphs(from);
|
| @@ -107,10 +107,10 @@ void Font::drawGlyphs(GraphicsContext* gc, const SimpleFontData* font,
|
| path.reset();
|
| path.moveTo(vPosBegin[i]);
|
| path.lineTo(vPosEnd[i]);
|
| - gc->drawTextOnPath(glyphs + i, 2, path, 0, paint);
|
| + gc->drawTextOnPath(glyphs + i, 2, path, textRect, 0, paint);
|
| }
|
| } else
|
| - gc->drawPosText(glyphs, numGlyphs << 1, pos, paint);
|
| + gc->drawPosText(glyphs, numGlyphs << 1, pos, textRect, paint);
|
| }
|
|
|
| if ((textMode & TextModeStroke)
|
| @@ -136,10 +136,10 @@ void Font::drawGlyphs(GraphicsContext* gc, const SimpleFontData* font,
|
| path.reset();
|
| path.moveTo(vPosBegin[i]);
|
| path.lineTo(vPosEnd[i]);
|
| - gc->drawTextOnPath(glyphs + i, 2, path, 0, paint);
|
| + gc->drawTextOnPath(glyphs + i, 2, path, textRect, 0, paint);
|
| }
|
| } else
|
| - gc->drawPosText(glyphs, numGlyphs << 1, pos, paint);
|
| + gc->drawPosText(glyphs, numGlyphs << 1, pos, textRect, paint);
|
| }
|
| }
|
|
|
| @@ -149,10 +149,9 @@ static void setupForTextPainting(SkPaint* paint, SkColor color)
|
| paint->setColor(color);
|
| }
|
|
|
| -void Font::drawComplexText(GraphicsContext* gc, const TextRun& run,
|
| - const FloatPoint& point, int from, int to) const
|
| +void Font::drawComplexText(GraphicsContext* gc, const TextRunPaintInfo& runInfo, const FloatPoint& point) const
|
| {
|
| - if (!run.length())
|
| + if (!runInfo.run.length())
|
| return;
|
|
|
| TextDrawingModeFlags textMode = gc->textDrawingModeSkia();
|
| @@ -175,15 +174,15 @@ void Font::drawComplexText(GraphicsContext* gc, const TextRun& run,
|
| }
|
|
|
| GlyphBuffer glyphBuffer;
|
| - HarfBuzzShaper shaper(this, run);
|
| - shaper.setDrawRange(from, to);
|
| + HarfBuzzShaper shaper(this, runInfo.run);
|
| + shaper.setDrawRange(runInfo.from, runInfo.to);
|
| if (!shaper.shape(&glyphBuffer))
|
| return;
|
| FloatPoint adjustedPoint = shaper.adjustStartPoint(point);
|
| - drawGlyphBuffer(gc, run, glyphBuffer, adjustedPoint);
|
| + drawGlyphBuffer(gc, runInfo, glyphBuffer, adjustedPoint);
|
| }
|
|
|
| -void Font::drawEmphasisMarksForComplexText(GraphicsContext* /* context */, const TextRun& /* run */, const AtomicString& /* mark */, const FloatPoint& /* point */, int /* from */, int /* to */) const
|
| +void Font::drawEmphasisMarksForComplexText(GraphicsContext* /* context */, const TextRunPaintInfo& /* runInfo */, const AtomicString& /* mark */, const FloatPoint& /* point */) const
|
| {
|
| notImplemented();
|
| }
|
|
|