| Index: src/gpu/GrStencilAndCoverTextContext.cpp
|
| diff --git a/src/gpu/GrStencilAndCoverTextContext.cpp b/src/gpu/GrStencilAndCoverTextContext.cpp
|
| index 1456aa22b5802d0e860dbcf1c17d18258e6499e1..7542647d6904d3d7d4f6bc0cb95e9c32b08cc364 100644
|
| --- a/src/gpu/GrStencilAndCoverTextContext.cpp
|
| +++ b/src/gpu/GrStencilAndCoverTextContext.cpp
|
| @@ -69,6 +69,21 @@ bool GrStencilAndCoverTextContext::canDraw(const GrRenderTarget* rt,
|
| return false;
|
| }
|
|
|
| + if (skPaint.isAntiAlias() &&
|
| + GrRenderTarget::kStencil_SampleConfig == rt->sampleConfig()) {
|
| + if (!paint.getXPFactory()->canTweakAlphaForCoverage()) {
|
| + return false;
|
| + }
|
| + // No Xfer processors that might do blending inside the shader.
|
| + // Coverage modulation for mixed samples is done *after* shading, so blending
|
| + // must occur in the ROP.
|
| + // TODO: Update Xfer processors to better support mixed samples.
|
| + if (paint.getXPFactory()->willNeedDstCopy(*fContext->getGpu()->caps(),
|
| + GrProcOptInfo(), GrProcOptInfo())) {
|
| + return false;
|
| + }
|
| + }
|
| +
|
| // No color bitmap fonts.
|
| SkScalerContext::Rec rec;
|
| SkScalerContext::MakeRec(skPaint, &fDeviceProperties, NULL, &rec);
|
| @@ -374,6 +389,8 @@ void GrStencilAndCoverTextContext::init(GrRenderTarget* rt,
|
| fStateRestore.set(&fPipelineBuilder);
|
|
|
| fPipelineBuilder.setFromPaint(fPaint, fRenderTarget, fClip);
|
| + SkASSERT(fRenderTarget->isMultisampled(GrRenderTarget::kStencil_BufferBit));
|
| + fPipelineBuilder.setState(GrPipelineBuilder::kHWAntialias_StateBit, fPaint.isAntiAlias());
|
|
|
| GR_STATIC_CONST_SAME_STENCIL(kStencilPass,
|
| kZero_StencilOp,
|
|
|