aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrBitmapTextContext.cpp
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2014-12-11 15:44:02 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-12-11 15:44:02 -0800
commit56995b5cc00c9c83bd5fcf86bca9a67e939a96cb (patch)
tree5afd6c8625f50f0dcdb17e0c7ac8854fbda53495 /src/gpu/GrBitmapTextContext.cpp
parent5756aff40921e700dc40f2a1757291a64acddeaa (diff)
Remove GP from drawstate, revision of invariant output for GP
Diffstat (limited to 'src/gpu/GrBitmapTextContext.cpp')
-rwxr-xr-xsrc/gpu/GrBitmapTextContext.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/gpu/GrBitmapTextContext.cpp b/src/gpu/GrBitmapTextContext.cpp
index 6a624ae23e..bf27584f26 100755
--- a/src/gpu/GrBitmapTextContext.cpp
+++ b/src/gpu/GrBitmapTextContext.cpp
@@ -549,8 +549,6 @@ void GrBitmapTextContext::flush() {
}
// Grayscale/BW text
case kA8_GrMaskFormat:
- drawState.setHint(GrDrawState::kVertexColorsAreOpaque_Hint,
- 0xFF == GrColorUnpackA(fPaint.getColor()));
break;
default:
SkFAIL("Unexpected mask format.");
@@ -561,32 +559,33 @@ void GrBitmapTextContext::flush() {
if (kARGB_GrMaskFormat == fCurrMaskFormat) {
uint32_t textureUniqueID = fCurrTexture->getUniqueID();
if (textureUniqueID != fEffectTextureUniqueID ||
- fCachedGeometryProcessor->getColor() != color) {
+ fCachedGeometryProcessor->color() != color) {
uint32_t flags = GrDefaultGeoProcFactory::kLocalCoord_GPType;
fCachedGeometryProcessor.reset(GrDefaultGeoProcFactory::Create(color, flags));
fCachedTextureProcessor.reset(GrSimpleTextureEffect::Create(fCurrTexture,
SkMatrix::I(),
params));
}
- drawState.setGeometryProcessor(fCachedGeometryProcessor.get());
drawState.addColorProcessor(fCachedTextureProcessor.get());
} else {
uint32_t textureUniqueID = fCurrTexture->getUniqueID();
if (textureUniqueID != fEffectTextureUniqueID ||
- fCachedGeometryProcessor->getColor() != color) {
+ fCachedGeometryProcessor->color() != color) {
bool hasColor = kA8_GrMaskFormat == fCurrMaskFormat;
+ bool opaqueVertexColors = GrColorIsOpaque(fPaint.getColor());
fCachedGeometryProcessor.reset(GrBitmapTextGeoProc::Create(color,
- fCurrTexture,
- params,
- hasColor));
+ fCurrTexture,
+ params,
+ hasColor,
+ opaqueVertexColors));
fEffectTextureUniqueID = textureUniqueID;
}
- drawState.setGeometryProcessor(fCachedGeometryProcessor.get());
}
int nGlyphs = fCurrVertex / kVerticesPerGlyph;
fDrawTarget->setIndexSourceToBuffer(fContext->getQuadIndexBuffer());
fDrawTarget->drawIndexedInstances(&drawState,
+ fCachedGeometryProcessor.get(),
kTriangles_GrPrimitiveType,
nGlyphs,
kVerticesPerGlyph,