diff options
-rwxr-xr-x | src/gpu/GrBitmapTextContext.cpp | 8 | ||||
-rwxr-xr-x | src/gpu/GrDistanceFieldTextContext.cpp | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/gpu/GrBitmapTextContext.cpp b/src/gpu/GrBitmapTextContext.cpp index f22b7608a6..2ff410e5cf 100755 --- a/src/gpu/GrBitmapTextContext.cpp +++ b/src/gpu/GrBitmapTextContext.cpp @@ -548,12 +548,12 @@ void GrBitmapTextContext::flush() { return; } - GrDrawState drawState; - drawState.setFromPaint(fPaint, SkMatrix::I(), fContext->getRenderTarget()); + if (fCurrVertex > 0) { + GrDrawState drawState; + drawState.setFromPaint(fPaint, SkMatrix::I(), fContext->getRenderTarget()); - set_vertex_attributes(&drawState, fCurrMaskFormat); + set_vertex_attributes(&drawState, fCurrMaskFormat); - if (fCurrVertex > 0) { // setup our sampler state for our text texture/atlas SkASSERT(SkIsAlign4(fCurrVertex)); SkASSERT(fCurrTexture); diff --git a/src/gpu/GrDistanceFieldTextContext.cpp b/src/gpu/GrDistanceFieldTextContext.cpp index db98238a0e..a012bc28b7 100755 --- a/src/gpu/GrDistanceFieldTextContext.cpp +++ b/src/gpu/GrDistanceFieldTextContext.cpp @@ -635,12 +635,12 @@ void GrDistanceFieldTextContext::flush() { return; } - GrDrawState drawState; - drawState.setFromPaint(fPaint, fContext->getMatrix(), fContext->getRenderTarget()); - bool useColorVerts = !fUseLCDText; - set_vertex_attributes(&drawState, useColorVerts); - if (fCurrVertex > 0) { + GrDrawState drawState; + drawState.setFromPaint(fPaint, fContext->getMatrix(), fContext->getRenderTarget()); + bool useColorVerts = !fUseLCDText; + set_vertex_attributes(&drawState, useColorVerts); + // setup our sampler state for our text texture/atlas SkASSERT(SkIsAlign4(fCurrVertex)); |