| Index: src/gpu/GrDrawContext.cpp
|
| diff --git a/src/gpu/GrDrawContext.cpp b/src/gpu/GrDrawContext.cpp
|
| index 0a6ab5b52704876ff8976489db3ecc114d3f8a2a..345d3e833f9ecc3e89ee624f48dd954639289fb0 100644
|
| --- a/src/gpu/GrDrawContext.cpp
|
| +++ b/src/gpu/GrDrawContext.cpp
|
| @@ -135,12 +135,9 @@ void GrDrawContext::drawText(const GrClip& clip, const GrPaint& grPaint,
|
| SkDEBUGCODE(this->validate();)
|
| GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrDrawContext::drawText");
|
|
|
| - if (!fAtlasTextContext) {
|
| - fAtlasTextContext.reset(GrAtlasTextContext::Create());
|
| - }
|
| -
|
| - fAtlasTextContext->drawText(fContext, this, clip, grPaint, skPaint, viewMatrix, fSurfaceProps,
|
| - text, byteLength, x, y, clipBounds);
|
| + GrAtlasTextContext* atlasTextContext = fDrawingManager->getAtlasTextContext();
|
| + atlasTextContext->drawText(fContext, this, clip, grPaint, skPaint, viewMatrix, fSurfaceProps,
|
| + text, byteLength, x, y, clipBounds);
|
| }
|
|
|
| void GrDrawContext::drawPosText(const GrClip& clip, const GrPaint& grPaint,
|
| @@ -154,13 +151,10 @@ void GrDrawContext::drawPosText(const GrClip& clip, const GrPaint& grPaint,
|
| SkDEBUGCODE(this->validate();)
|
| GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrDrawContext::drawPosText");
|
|
|
| - if (!fAtlasTextContext) {
|
| - fAtlasTextContext.reset(GrAtlasTextContext::Create());
|
| - }
|
| -
|
| - fAtlasTextContext->drawPosText(fContext, this, clip, grPaint, skPaint, viewMatrix,
|
| - fSurfaceProps, text, byteLength, pos, scalarsPerPosition,
|
| - offset, clipBounds);
|
| + GrAtlasTextContext* atlasTextContext = fDrawingManager->getAtlasTextContext();
|
| + atlasTextContext->drawPosText(fContext, this, clip, grPaint, skPaint, viewMatrix,
|
| + fSurfaceProps, text, byteLength, pos, scalarsPerPosition,
|
| + offset, clipBounds);
|
|
|
| }
|
|
|
| @@ -173,12 +167,9 @@ void GrDrawContext::drawTextBlob(const GrClip& clip, const SkPaint& skPaint,
|
| SkDEBUGCODE(this->validate();)
|
| GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrDrawContext::drawTextBlob");
|
|
|
| - if (!fAtlasTextContext) {
|
| - fAtlasTextContext.reset(GrAtlasTextContext::Create());
|
| - }
|
| -
|
| - fAtlasTextContext->drawTextBlob(fContext, this, clip, skPaint, viewMatrix, fSurfaceProps, blob,
|
| - x, y, filter, clipBounds);
|
| + GrAtlasTextContext* atlasTextContext = fDrawingManager->getAtlasTextContext();
|
| + atlasTextContext->drawTextBlob(fContext, this, clip, skPaint, viewMatrix, fSurfaceProps, blob,
|
| + x, y, filter, clipBounds);
|
| }
|
|
|
| void GrDrawContext::discard() {
|
|
|