diff options
Diffstat (limited to 'src/atlastext/SkAtlasTextTarget.cpp')
-rw-r--r-- | src/atlastext/SkAtlasTextTarget.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/atlastext/SkAtlasTextTarget.cpp b/src/atlastext/SkAtlasTextTarget.cpp index d80c7a45d7..f553ffad96 100644 --- a/src/atlastext/SkAtlasTextTarget.cpp +++ b/src/atlastext/SkAtlasTextTarget.cpp @@ -183,12 +183,18 @@ void GrAtlasTextOp::executeForTextTarget(SkAtlasTextTarget* target) { FlushInfo flushInfo; SkAutoGlyphCache glyphCache; auto& context = target->context()->internal(); - auto* atlasGlyphCache = context.grContext()->contextPriv().getAtlasGlyphCache(); + auto atlasGlyphCache = context.grContext()->contextPriv().getAtlasGlyphCache(); + auto resourceProvider = context.grContext()->contextPriv().resourceProvider(); + auto drawingManager = context.grContext()->contextPriv().drawingManager(); + + GrOnFlushResourceProvider onFlushResourceProvider(drawingManager); + atlasGlyphCache->preFlush(&onFlushResourceProvider, nullptr, 0, nullptr); + for (int i = 0; i < fGeoCount; ++i) { GrAtlasTextBlob::VertexRegenerator regenerator( - fGeoData[i].fBlob, fGeoData[i].fRun, fGeoData[i].fSubRun, fGeoData[i].fViewMatrix, - fGeoData[i].fX, fGeoData[i].fY, fGeoData[i].fColor, &context, atlasGlyphCache, - &glyphCache); + resourceProvider, fGeoData[i].fBlob, fGeoData[i].fRun, fGeoData[i].fSubRun, + fGeoData[i].fViewMatrix, fGeoData[i].fX, fGeoData[i].fY, fGeoData[i].fColor, + &context, atlasGlyphCache, &glyphCache); GrAtlasTextBlob::VertexRegenerator::Result result; do { result = regenerator.regenerate(); |