diff options
author | 2018-11-21 11:01:57 -0500 | |
---|---|---|
committer | 2018-11-21 11:02:19 -0500 | |
commit | 1c79eabd0ee5e927f6215d9486a0e5def07d2e82 (patch) | |
tree | 7d13709167322322f4cc513b86e46d89719e9ad3 /libs/hwui/SkiaCanvas.cpp | |
parent | fe866139a34cd7d5a367101c0bca7dd62c19f8e4 (diff) |
pass font instead of paint to blobbuilder
Test: make
Change-Id: I8605b03098f8fe1d255d3e4d690680c52baf2352
Diffstat (limited to 'libs/hwui/SkiaCanvas.cpp')
-rw-r--r-- | libs/hwui/SkiaCanvas.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/hwui/SkiaCanvas.cpp b/libs/hwui/SkiaCanvas.cpp index 9c707bab95f1..9a15ff2de463 100644 --- a/libs/hwui/SkiaCanvas.cpp +++ b/libs/hwui/SkiaCanvas.cpp @@ -30,6 +30,7 @@ #include <SkColorSpaceXformCanvas.h> #include <SkDeque.h> #include <SkDrawable.h> +#include <SkFont.h> #include <SkGraphics.h> #include <SkImage.h> #include <SkImagePriv.h> @@ -732,6 +733,7 @@ void SkiaCanvas::drawGlyphs(ReadGlyphFunc glyphFunc, int count, const SkPaint& p float y, float boundsLeft, float boundsTop, float boundsRight, float boundsBottom, float totalAdvance) { if (count <= 0 || paint.nothingToDraw()) return; + SkFont font = SkFont::LEGACY_ExtractFromPaint(paint); SkPaint paintCopy(paint); if (mPaintFilter) { mPaintFilter->filter(&paintCopy); @@ -748,7 +750,7 @@ void SkiaCanvas::drawGlyphs(ReadGlyphFunc glyphFunc, int count, const SkPaint& p SkRect::MakeLTRB(boundsLeft + x, boundsTop + y, boundsRight + x, boundsBottom + y); SkTextBlobBuilder builder; - const SkTextBlobBuilder::RunBuffer& buffer = builder.allocRunPos(paintCopy, count, &bounds); + const SkTextBlobBuilder::RunBuffer& buffer = builder.allocRunPos(font, count, &bounds); glyphFunc(buffer.glyphs, buffer.pos); sk_sp<SkTextBlob> textBlob(builder.make()); |