aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrBitmapTextContext.cpp
diff options
context:
space:
mode:
authorGravatar egdaniel <egdaniel@google.com>2015-01-22 10:16:09 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-01-22 10:16:09 -0800
commit8dd688b7569df569a672a8a67b2db86a9d376cfc (patch)
treee173468f68becd63d0796010c6ddf15215912d3b /src/gpu/GrBitmapTextContext.cpp
parente44acc9617b875e2ffc84cdf938a5e359e8e8edb (diff)
Rename GrOptDrawState to GrPipeline and GrDrawState to GrPipelineBuilder
Diffstat (limited to 'src/gpu/GrBitmapTextContext.cpp')
-rwxr-xr-xsrc/gpu/GrBitmapTextContext.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gpu/GrBitmapTextContext.cpp b/src/gpu/GrBitmapTextContext.cpp
index 2df3a710d2..f39e7a1bb0 100755
--- a/src/gpu/GrBitmapTextContext.cpp
+++ b/src/gpu/GrBitmapTextContext.cpp
@@ -529,8 +529,8 @@ void GrBitmapTextContext::flush() {
}
if (fCurrVertex > 0) {
- GrDrawState drawState;
- drawState.setFromPaint(fPaint, fContext->getRenderTarget());
+ GrPipelineBuilder pipelineBuilder;
+ pipelineBuilder.setFromPaint(fPaint, fContext->getRenderTarget());
// setup our sampler state for our text texture/atlas
SkASSERT(SkIsAlign4(fCurrVertex));
@@ -550,7 +550,8 @@ void GrBitmapTextContext::flush() {
// TODO: move supportsRGBCoverage check to setupCoverageEffect and only add LCD
// processor if the xp can support it. For now we will simply assume that if
// fUseLCDText is true, then we have a known color output.
- if (!drawState.getXPFactory()->supportsRGBCoverage(0, kRGBA_GrColorComponentFlags)) {
+ const GrXPFactory* xpFactory = pipelineBuilder.getXPFactory();
+ if (!xpFactory->supportsRGBCoverage(0, kRGBA_GrColorComponentFlags)) {
SkDebugf("LCD Text will not draw correctly.\n");
}
break;
@@ -574,7 +575,7 @@ void GrBitmapTextContext::flush() {
params));
fEffectTextureUniqueID = textureUniqueID;
}
- drawState.addColorProcessor(fCachedTextureProcessor.get());
+ pipelineBuilder.addColorProcessor(fCachedTextureProcessor.get());
} else {
uint32_t textureUniqueID = fCurrTexture->getUniqueID();
if (textureUniqueID != fEffectTextureUniqueID ||
@@ -594,7 +595,7 @@ void GrBitmapTextContext::flush() {
int nGlyphs = fCurrVertex / kVerticesPerGlyph;
fDrawTarget->setIndexSourceToBuffer(fContext->getQuadIndexBuffer());
- fDrawTarget->drawIndexedInstances(&drawState,
+ fDrawTarget->drawIndexedInstances(&pipelineBuilder,
fCachedGeometryProcessor.get(),
kTriangles_GrPrimitiveType,
nGlyphs,