Index: src/gpu/GrBitmapTextContext.cpp |
diff --git a/src/gpu/GrBitmapTextContext.cpp b/src/gpu/GrBitmapTextContext.cpp |
index f22b7608a6796d711a82f93bdfe09004663af4f7..2ff410e5cf278ca6b89c58e382c44af8b22f1720 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); |