diff options
author | Brian Salomon <bsalomon@google.com> | 2017-04-08 07:38:53 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-08 12:17:11 +0000 |
commit | 48d1b4c2b2c0f41a10376ed657cde043d8f11979 (patch) | |
tree | 5d970e48864be1d57809f14e136f5da9b388eb61 /src/gpu/text | |
parent | 5dac9b3b5bf7e9c06c207cb92e257535c7d9ec95 (diff) |
Revert "Revert "Create GrXferProcessor while doing GrProcessorSet analysis.""
This reverts commit 5dac9b3b5bf7e9c06c207cb92e257535c7d9ec95.
Bug: skia:
Change-Id: I3db2ec6776eb10c1f863b3992a2c8048c54b130f
Reviewed-on: https://skia-review.googlesource.com/12620
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/text')
-rw-r--r-- | src/gpu/text/GrStencilAndCoverTextContext.cpp | 13 | ||||
-rw-r--r-- | src/gpu/text/GrStencilAndCoverTextContext.h | 2 |
2 files changed, 11 insertions, 4 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)); diff --git a/src/gpu/text/GrStencilAndCoverTextContext.h b/src/gpu/text/GrStencilAndCoverTextContext.h index f06442b1be..54c0a9d758 100644 --- a/src/gpu/text/GrStencilAndCoverTextContext.h +++ b/src/gpu/text/GrStencilAndCoverTextContext.h @@ -83,7 +83,7 @@ private: size_t computeSizeInCache() const; - GrAA isAntiAlias() const { return fFont.isAntiAlias() ? GrAA::kYes : GrAA::kNo; } + GrAA aa() const { return fFont.isAntiAlias() ? GrAA::kYes : GrAA::kNo; } private: typedef GrDrawPathRangeOp::InstanceData InstanceData; |