Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Unified Diff: src/gpu/GrDistanceFieldTextContext.cpp

Issue 791743003: Remove GP from drawstate, revision of invariant output for GP (Closed) Base URL: https://skia.googlesource.com/skia.git@color-to-gp
Patch Set: feedback inc Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/gpu/GrDistanceFieldTextContext.cpp
diff --git a/src/gpu/GrDistanceFieldTextContext.cpp b/src/gpu/GrDistanceFieldTextContext.cpp
index d35ba233e720c12f87f228c7c9f4545aed27aee7..ea72c290dd5418a016cb39b27b13c57e71d4dea6 100755
--- a/src/gpu/GrDistanceFieldTextContext.cpp
+++ b/src/gpu/GrDistanceFieldTextContext.cpp
@@ -637,9 +637,6 @@ void GrDistanceFieldTextContext::flush() {
}
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
@@ -648,17 +645,18 @@ void GrDistanceFieldTextContext::flush() {
if (!drawState.getXPFactory()->supportsRGBCoverage(0, kRGBA_GrColorComponentFlags)) {
SkDebugf("LCD Text will not draw correctly.\n");
}
- SkASSERT(!drawState.hasColorVertexAttribute());
+ SkASSERT(!fCachedGeometryProcessor->hasVertexColor());
} else {
if (0xFF == GrColorUnpackA(fPaint.getColor())) {
drawState.setHint(GrDrawState::kVertexColorsAreOpaque_Hint, true);
}
// We're using per-vertex color.
- SkASSERT(drawState.hasColorVertexAttribute());
+ SkASSERT(fCachedGeometryProcessor->hasVertexColor());
}
int nGlyphs = fCurrVertex / kVerticesPerGlyph;
fDrawTarget->setIndexSourceToBuffer(fContext->getQuadIndexBuffer());
fDrawTarget->drawIndexedInstances(&drawState,
+ fCachedGeometryProcessor.get(),
kTriangles_GrPrimitiveType,
nGlyphs,
kVerticesPerGlyph,

Powered by Google App Engine
This is Rietveld 408576698