aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/atlastext
diff options
context:
space:
mode:
Diffstat (limited to 'src/atlastext')
-rw-r--r--src/atlastext/SkInternalAtlasTextContext.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/atlastext/SkInternalAtlasTextContext.cpp b/src/atlastext/SkInternalAtlasTextContext.cpp
index 8be7e1fb67..858ae4da01 100644
--- a/src/atlastext/SkInternalAtlasTextContext.cpp
+++ b/src/atlastext/SkInternalAtlasTextContext.cpp
@@ -98,17 +98,16 @@ void SkInternalAtlasTextContext::flush() {
for (const auto& upload : fASAPUploads) {
upload(writePixelsFn);
}
- auto draw = fDraws.begin();
auto inlineUpload = fInlineUploads.begin();
- while (draw != fDraws.end()) {
- while (inlineUpload != fInlineUploads.end() && inlineUpload->fToken == draw->fToken) {
+ for (const auto& draw : fDraws) {
+ while (inlineUpload != fInlineUploads.end() && inlineUpload->fToken == draw.fToken) {
inlineUpload->fUpload(writePixelsFn);
++inlineUpload;
}
- auto vertices = reinterpret_cast<const SkAtlasTextRenderer::SDFVertex*>(draw->fVertexData);
- fRenderer->drawSDFGlyphs(draw->fTargetHandle, fDistanceFieldAtlas.fTextureHandle, vertices,
- draw->fGlyphCnt);
- ++draw;
+ auto vertices = reinterpret_cast<const SkAtlasTextRenderer::SDFVertex*>(draw.fVertexData);
+ fRenderer->drawSDFGlyphs(draw.fTargetHandle, fDistanceFieldAtlas.fTextureHandle, vertices,
+ draw.fGlyphCnt);
+ this->flushToken();
}
fASAPUploads.reset();
fInlineUploads.reset();