diff options
Diffstat (limited to 'src/gpu/text/GrStencilAndCoverTextContext.cpp')
-rw-r--r-- | src/gpu/text/GrStencilAndCoverTextContext.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/gpu/text/GrStencilAndCoverTextContext.cpp b/src/gpu/text/GrStencilAndCoverTextContext.cpp index e572e5d633..0ae4023b1c 100644 --- a/src/gpu/text/GrStencilAndCoverTextContext.cpp +++ b/src/gpu/text/GrStencilAndCoverTextContext.cpp @@ -570,9 +570,7 @@ void GrStencilAndCoverTextContext::TextRun::draw(GrContext* ctx, SkScalar y, const SkIRect& clipBounds, GrAtlasTextContext* fallbackTextContext, const SkPaint& originalSkPaint) const { - GrAA runAA = this->isAntiAlias(); SkASSERT(fInstanceData); - SkASSERT(renderTargetContext->isStencilBufferMultisampled() || GrAA::kNo == runAA); if (fInstanceData->count()) { static constexpr GrUserStencilSettings kCoverPass( @@ -606,9 +604,18 @@ void GrStencilAndCoverTextContext::TextRun::draw(GrContext* ctx, renderTargetContext->height()); // The run's "font" overrides the anti-aliasing of the passed in SkPaint! + GrAAType aaType; + if (this->aa() == GrAA::kYes) { + SkASSERT(renderTargetContext->isStencilBufferMultisampled()); + aaType = renderTargetContext->isUnifiedMultisampled() ? GrAAType::kMSAA + : GrAAType::kMixedSamples; + } else { + aaType = GrAAType::kNone; + } + std::unique_ptr<GrDrawOp> op = GrDrawPathRangeOp::Make( viewMatrix, fTextRatio, fTextInverseRatio * x, fTextInverseRatio * y, - std::move(grPaint), GrPathRendering::kWinding_FillType, runAA, glyphs.get(), + std::move(grPaint), GrPathRendering::kWinding_FillType, aaType, glyphs.get(), fInstanceData.get(), bounds); renderTargetContext->addDrawOp(clip, std::move(op)); |