diff options
Diffstat (limited to 'src/core/SkBitmapDevice.cpp')
-rw-r--r-- | src/core/SkBitmapDevice.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/core/SkBitmapDevice.cpp b/src/core/SkBitmapDevice.cpp index 08c36d3980..cb169dca87 100644 --- a/src/core/SkBitmapDevice.cpp +++ b/src/core/SkBitmapDevice.cpp @@ -7,6 +7,7 @@ #include "SkBitmapDevice.h" #include "SkDraw.h" +#include "SkGlyphRun.h" #include "SkImageFilter.h" #include "SkImageFilterCache.h" #include "SkMallocPixelRef.h" @@ -570,6 +571,22 @@ void SkBitmapDevice::drawPosText(const void* text, size_t len, const SkScalar xp nullptr) } +void SkBitmapDevice::drawGlyphRunList(SkGlyphRunList* glyphRunList) { +#ifdef SK_SUPPORT_LEGACY_TEXT_BLOB + auto blob = glyphRunList->blob(); + + if (blob == nullptr) { + glyphRunList->temporaryShuntToDrawPosText(this, SkPoint::Make(0, 0)); + } else { + auto origin = glyphRunList->origin(); + auto paint = glyphRunList->paint(); + this->drawTextBlob(blob, origin.x(), origin.y(), paint); + } +#else + glyphRunList->temporaryShuntToDrawPosText(this, glyphRunList->origin()); +#endif +} + void SkBitmapDevice::drawVertices(const SkVertices* vertices, const SkMatrix* bones, int boneCount, SkBlendMode bmode, const SkPaint& paint) { BDDraw(this).drawVertices(vertices->mode(), vertices->vertexCount(), vertices->positions(), |