aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrBatchFontCache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/GrBatchFontCache.cpp')
-rw-r--r--src/gpu/GrBatchFontCache.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gpu/GrBatchFontCache.cpp b/src/gpu/GrBatchFontCache.cpp
index f3844cecba..ad76e4d71f 100644
--- a/src/gpu/GrBatchFontCache.cpp
+++ b/src/gpu/GrBatchFontCache.cpp
@@ -196,8 +196,9 @@ void GrBatchTextStrike::removeID(GrBatchAtlas::AtlasID id) {
}
}
-bool GrBatchTextStrike::addGlyphToAtlas(GrDrawBatch::Target* target, GrGlyph* glyph,
- GrFontScaler* scaler, const SkGlyph& skGlyph,
+bool GrBatchTextStrike::addGlyphToAtlas(GrDrawBatch::Target* target,
+ GrGlyph* glyph,
+ GrFontScaler* scaler,
GrMaskFormat expectedMaskFormat) {
SkASSERT(glyph);
SkASSERT(scaler);
@@ -210,6 +211,7 @@ bool GrBatchTextStrike::addGlyphToAtlas(GrDrawBatch::Target* target, GrGlyph* gl
size_t size = glyph->fBounds.area() * bytesPerPixel;
SkAutoSMalloc<1024> storage(size);
+ const SkGlyph& skGlyph = scaler->grToSkGlyph(glyph->fPackedID);
if (GrGlyph::kDistance_MaskStyle == GrGlyph::UnpackMaskStyle(glyph->fPackedID)) {
if (!scaler->getPackedGlyphDFImage(skGlyph, glyph->width(), glyph->height(),
storage.get())) {