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

Unified Diff: src/gpu/GrDistanceFieldTextContext.cpp

Issue 858343002: Rename GrOptDrawState to GrPipeline and GrDrawState to GrPipelineBuilder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more nits Created 5 years, 11 months 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
« no previous file with comments | « src/gpu/GrDefaultPathRenderer.cpp ('k') | src/gpu/GrDrawState.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDistanceFieldTextContext.cpp
diff --git a/src/gpu/GrDistanceFieldTextContext.cpp b/src/gpu/GrDistanceFieldTextContext.cpp
index 14809756c80aeb7e19086f75c28ecd23002de3a1..425c56c892ed2ccf50c8b1ea3781e18437858d25 100755
--- a/src/gpu/GrDistanceFieldTextContext.cpp
+++ b/src/gpu/GrDistanceFieldTextContext.cpp
@@ -636,8 +636,8 @@ void GrDistanceFieldTextContext::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));
@@ -657,7 +657,8 @@ void GrDistanceFieldTextContext::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");
}
SkASSERT(!fCachedGeometryProcessor->hasVertexColor());
@@ -667,7 +668,7 @@ void GrDistanceFieldTextContext::flush() {
}
int nGlyphs = fCurrVertex / kVerticesPerGlyph;
fDrawTarget->setIndexSourceToBuffer(fContext->getQuadIndexBuffer());
- fDrawTarget->drawIndexedInstances(&drawState,
+ fDrawTarget->drawIndexedInstances(&pipelineBuilder,
fCachedGeometryProcessor.get(),
kTriangles_GrPrimitiveType,
nGlyphs,
« no previous file with comments | « src/gpu/GrDefaultPathRenderer.cpp ('k') | src/gpu/GrDrawState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698