diff options
Diffstat (limited to 'core/fxge')
-rw-r--r-- | core/fxge/skia/fx_skia_device.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp index 86a8269b79..6b2e2a2623 100644 --- a/core/fxge/skia/fx_skia_device.cpp +++ b/core/fxge/skia/fx_skia_device.cpp @@ -605,11 +605,16 @@ FX_BOOL CFX_SkiaDeviceDriver::DrawDeviceText(int nChars, m_pCanvas->save(); SkMatrix skMatrix = ToFlippedSkMatrix(*pObject2Device); m_pCanvas->concat(skMatrix); + SkTDArray<SkPoint> positions; + positions.setCount(nChars); + SkTDArray<uint16_t> glyphs; + glyphs.setCount(nChars); for (int index = 0; index < nChars; ++index) { const FXTEXT_CHARPOS& cp = pCharPos[index]; - uint16_t glyph = (uint16_t)cp.m_GlyphIndex; - m_pCanvas->drawText(&glyph, 2, cp.m_OriginX, cp.m_OriginY, paint); + positions[index] = {cp.m_OriginX, cp.m_OriginY}; + glyphs[index] = (uint16_t)cp.m_GlyphIndex; } + m_pCanvas->drawPosText(glyphs.begin(), nChars * 2, positions.begin(), paint); m_pCanvas->restore(); return TRUE; } |