Index: src/gpu/text/GrStencilAndCoverTextContext.cpp |
diff --git a/src/gpu/text/GrStencilAndCoverTextContext.cpp b/src/gpu/text/GrStencilAndCoverTextContext.cpp |
index 1355036ffe095da0d8bcc504127b1da549b0df0f..86f5888486dff2bf9760a8d74c29e0b4cb160011 100644 |
--- a/src/gpu/text/GrStencilAndCoverTextContext.cpp |
+++ b/src/gpu/text/GrStencilAndCoverTextContext.cpp |
@@ -82,7 +82,8 @@ void GrStencilAndCoverTextContext::drawText(GrContext* context, GrDrawContext* d |
} else if (this->canDraw(skPaint, viewMatrix)) { |
if (skPaint.getTextSize() > 0) { |
TextRun run(skPaint); |
- GrPipelineBuilder pipelineBuilder(paint, dc->accessRenderTarget(), clip); |
+ GrPipelineBuilder pipelineBuilder(paint, dc->accessRenderTarget(), clip, |
+ run.isAntiAlias()); |
run.setText(text, byteLength, x, y); |
run.draw(context, dc, &pipelineBuilder, paint.getColor(), viewMatrix, props, 0, 0, |
clipBounds, fFallbackTextContext, skPaint); |
@@ -117,7 +118,8 @@ void GrStencilAndCoverTextContext::drawPosText(GrContext* context, GrDrawContext |
} else if (this->canDraw(skPaint, viewMatrix)) { |
if (skPaint.getTextSize() > 0) { |
TextRun run(skPaint); |
- GrPipelineBuilder pipelineBuilder(paint, dc->accessRenderTarget(), clip); |
+ GrPipelineBuilder pipelineBuilder(paint, dc->accessRenderTarget(), clip, |
+ run.isAntiAlias()); |
run.setPosText(text, byteLength, pos, scalarsPerPosition, offset); |
run.draw(context, dc, &pipelineBuilder, paint.getColor(), viewMatrix, props, 0, 0, |
clipBounds, fFallbackTextContext, skPaint); |
@@ -229,6 +231,7 @@ void GrStencilAndCoverTextContext::drawTextBlob(GrContext* context, GrDrawContex |
TextBlob::Iter iter(blob); |
for (TextRun* run = iter.get(); run; run = iter.next()) { |
+ pipelineBuilder.setState(GrPipelineBuilder::kHWAntialias_Flag, run->isAntiAlias()); |
run->draw(context, dc, &pipelineBuilder, paint.getColor(), viewMatrix, props, x, y, |
clipBounds, fFallbackTextContext, skPaint); |
run->releaseGlyphCache(); |
@@ -583,8 +586,6 @@ void GrStencilAndCoverTextContext::TextRun::draw(GrContext* ctx, |
SkASSERT(dc->accessRenderTarget()->isStencilBufferMultisampled() || !fFont.isAntiAlias()); |
if (fInstanceData->count()) { |
- pipelineBuilder->setState(GrPipelineBuilder::kHWAntialias_Flag, fFont.isAntiAlias()); |
- |
GR_STATIC_CONST_SAME_STENCIL(kStencilPass, |
kZero_StencilOp, |
kKeep_StencilOp, |