diff options
-rw-r--r-- | src/gpu/GrTextContext.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gpu/GrTextContext.cpp b/src/gpu/GrTextContext.cpp index 2a26dae2e6..684b7f749f 100644 --- a/src/gpu/GrTextContext.cpp +++ b/src/gpu/GrTextContext.cpp @@ -212,11 +212,13 @@ HAS_ATLAS: if (flush) { this->flushGlyphs(); fContext->flush(); + // flushGlyphs() will reset fDrawTarget to NULL. + fDrawTarget = fContext->getTextTarget(fPaint); + fDrawTarget->drawState()->setVertexLayout(fVertexLayout); } fMaxVertices = kDefaultRequestedVerts; // ignore return, no point in flushing again. - fDrawTarget->geometryHints(&fMaxVertices, - NULL); + fDrawTarget->geometryHints(&fMaxVertices, NULL); int maxQuadVertices = 4 * fContext->getQuadIndexBuffer()->maxQuads(); if (fMaxVertices < kMinRequestedVerts) { |