Cleanup of r2830.
git-svn-id: http://skia.googlecode.com/svn/trunk@2841 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrTextContext.cpp b/src/gpu/GrTextContext.cpp
index 4b78d4a..3b3841b 100644
--- a/src/gpu/GrTextContext.cpp
+++ b/src/gpu/GrTextContext.cpp
@@ -25,7 +25,7 @@
void GrTextContext::flushGlyphs() {
if (fCurrVertex > 0) {
GrDrawTarget::AutoStateRestore asr(fDrawTarget);
-
+ GrDrawState* drawState = fDrawTarget->drawState();
// setup our sampler state for our text texture/atlas
GrSamplerState::Filter filter;
if (fExtMatrix.isIdentity()) {
@@ -35,12 +35,12 @@
}
GrSamplerState sampler(GrSamplerState::kRepeat_WrapMode,
filter);
- fDrawTarget->setSamplerState(kGlyphMaskStage, sampler);
+ drawState->setSampler(kGlyphMaskStage, sampler);
GrAssert(GrIsALIGN4(fCurrVertex));
int nIndices = fCurrVertex + (fCurrVertex >> 1);
GrAssert(fCurrTexture);
- fDrawTarget->setTexture(kGlyphMaskStage, fCurrTexture);
+ drawState->setTexture(kGlyphMaskStage, fCurrTexture);
if (!GrPixelConfigIsAlphaOnly(fCurrTexture->config())) {
if (kOne_BlendCoeff != fPaint.fSrcBlendCoeff ||
@@ -49,15 +49,15 @@
GrPrintf("LCD Text will not draw correctly.\n");
}
// setup blend so that we get mask * paintColor + (1-mask)*dstColor
- fDrawTarget->setBlendConstant(fPaint.fColor);
+ drawState->setBlendConstant(fPaint.fColor);
fDrawTarget->setBlendFunc(kConstC_BlendCoeff, kISC_BlendCoeff);
// don't modulate by the paint's color in the frag since we're
// already doing it via the blend const.
- fDrawTarget->setColor(0xffffffff);
+ drawState->setColor(0xffffffff);
} else {
// set back to normal in case we took LCD path previously.
fDrawTarget->setBlendFunc(fPaint.fSrcBlendCoeff, fPaint.fDstBlendCoeff);
- fDrawTarget->setColor(fPaint.fColor);
+ drawState->setColor(fPaint.fColor);
}
fDrawTarget->setIndexSourceToBuffer(fContext->getQuadIndexBuffer());