fix for use of uninit variable

TBR=
BUG=skia:

Review URL: https://codereview.chromium.org/740463002
This commit is contained in:
joshualitt 2014-11-18 09:40:40 -08:00 committed by Commit bot
parent 0bd57b2e1e
commit 780b11e4ec
2 changed files with 10 additions and 10 deletions

View File

@ -548,12 +548,12 @@ void GrBitmapTextContext::flush() {
return;
}
GrDrawState drawState;
drawState.setFromPaint(fPaint, SkMatrix::I(), fContext->getRenderTarget());
set_vertex_attributes(&drawState, fCurrMaskFormat);
if (fCurrVertex > 0) {
GrDrawState drawState;
drawState.setFromPaint(fPaint, SkMatrix::I(), fContext->getRenderTarget());
set_vertex_attributes(&drawState, fCurrMaskFormat);
// setup our sampler state for our text texture/atlas
SkASSERT(SkIsAlign4(fCurrVertex));
SkASSERT(fCurrTexture);

View File

@ -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));