Index: src/gpu/GrDistanceFieldTextContext.cpp |
diff --git a/src/gpu/GrDistanceFieldTextContext.cpp b/src/gpu/GrDistanceFieldTextContext.cpp |
index ea72c290dd5418a016cb39b27b13c57e71d4dea6..d35ba233e720c12f87f228c7c9f4545aed27aee7 100755 |
--- a/src/gpu/GrDistanceFieldTextContext.cpp |
+++ b/src/gpu/GrDistanceFieldTextContext.cpp |
@@ -637,6 +637,9 @@ |
} |
this->setupCoverageEffect(filteredColor); |
+ // Effects could be stored with one of the cache objects (atlas?) |
+ drawState.setGeometryProcessor(fCachedGeometryProcessor.get()); |
+ |
// Set draw state |
if (fUseLCDText) { |
// TODO: move supportsRGBCoverage check to setupCoverageEffect and only add LCD |
@@ -645,18 +648,17 @@ |
if (!drawState.getXPFactory()->supportsRGBCoverage(0, kRGBA_GrColorComponentFlags)) { |
SkDebugf("LCD Text will not draw correctly.\n"); |
} |
- SkASSERT(!fCachedGeometryProcessor->hasVertexColor()); |
+ SkASSERT(!drawState.hasColorVertexAttribute()); |
} else { |
if (0xFF == GrColorUnpackA(fPaint.getColor())) { |
drawState.setHint(GrDrawState::kVertexColorsAreOpaque_Hint, true); |
} |
// We're using per-vertex color. |
- SkASSERT(fCachedGeometryProcessor->hasVertexColor()); |
+ SkASSERT(drawState.hasColorVertexAttribute()); |
} |
int nGlyphs = fCurrVertex / kVerticesPerGlyph; |
fDrawTarget->setIndexSourceToBuffer(fContext->getQuadIndexBuffer()); |
fDrawTarget->drawIndexedInstances(&drawState, |
- fCachedGeometryProcessor.get(), |
kTriangles_GrPrimitiveType, |
nGlyphs, |
kVerticesPerGlyph, |