Index: src/gpu/batches/GrAtlasTextBatch.cpp |
diff --git a/src/gpu/batches/GrAtlasTextBatch.cpp b/src/gpu/batches/GrAtlasTextBatch.cpp |
index cfc97c44e199bc382997e56b6daaaff9f5887a53..8e886d2060b5dcbb5af399507311e89854c87a6f 100644 |
--- a/src/gpu/batches/GrAtlasTextBatch.cpp |
+++ b/src/gpu/batches/GrAtlasTextBatch.cpp |
@@ -168,24 +168,18 @@ void GrAtlasTextBatch::regenBlob(Target* target, FlushInfo* flushInfo, Blob* blo |
if (regenTexCoords) { |
size_t glyphOffset = glyphIdx + info->fGlyphStartIndex; |
- glyph = blob->fGlyphs[glyphOffset]; |
- GrGlyph::PackedID id = glyph->fPackedID; |
- const SkGlyph& skGlyph = (*scaler)->grToSkGlyph(id); |
if (regenGlyphs) { |
// Get the id from the old glyph, and use the new strike to lookup |
// the glyph. |
- blob->fGlyphs[glyphOffset] = strike->getGlyph(skGlyph, id, this->maskFormat(), |
- *scaler); |
+ GrGlyph::PackedID id = blob->fGlyphs[glyphOffset]->fPackedID; |
+ blob->fGlyphs[glyphOffset] = strike->getGlyph(id, this->maskFormat(), *scaler); |
+ SkASSERT(id == blob->fGlyphs[glyphOffset]->fPackedID); |
} |
glyph = blob->fGlyphs[glyphOffset]; |
- SkASSERT(glyph); |
- SkASSERT(id == glyph->fPackedID); |
- // We want to be able to assert this but cannot for testing purposes. |
- // once skbug:4143 has landed we can revist this assert |
- //SkASSERT(glyph->fMaskFormat == this->maskFormat()); |
+ SkASSERT(glyph && glyph->fMaskFormat == this->maskFormat()); |
if (!fFontCache->hasGlyph(glyph) && |
- !strike->addGlyphToAtlas(target, glyph, *scaler, skGlyph, this->maskFormat())) { |
+ !strike->addGlyphToAtlas(target, glyph, *scaler, this->maskFormat())) { |
this->flush(target, flushInfo); |
target->initDraw(gp, this->pipeline()); |
brokenRun = glyphIdx > 0; |
@@ -193,7 +187,6 @@ void GrAtlasTextBatch::regenBlob(Target* target, FlushInfo* flushInfo, Blob* blo |
SkDEBUGCODE(bool success =) strike->addGlyphToAtlas(target, |
glyph, |
*scaler, |
- skGlyph, |
this->maskFormat()); |
SkASSERT(success); |
} |