Remove hasMixedSamples() from GrPipelineBuilder
This info is unknown until after any clip has been applied to the
stencil settings, so it's misleading to include in the builder.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1952323002
Review-Url: https://codereview.chromium.org/1952323002
diff --git a/src/gpu/GrPipeline.cpp b/src/gpu/GrPipeline.cpp
index 55cbf34..8d384ef 100644
--- a/src/gpu/GrPipeline.cpp
+++ b/src/gpu/GrPipeline.cpp
@@ -21,11 +21,13 @@
const GrPipelineBuilder& builder = *args.fPipelineBuilder;
// Create XferProcessor from DS's XPFactory
+ bool hasMixedSamples = builder.getRenderTarget()->hasMixedSamples() &&
+ (builder.isHWAntialias() || !builder.getStencil().isDisabled());
const GrXPFactory* xpFactory = builder.getXPFactory();
SkAutoTUnref<GrXferProcessor> xferProcessor;
if (xpFactory) {
xferProcessor.reset(xpFactory->createXferProcessor(args.fOpts,
- builder.hasMixedSamples(),
+ hasMixedSamples,
&args.fDstTexture,
*args.fCaps));
if (!xferProcessor) {
@@ -36,10 +38,10 @@
xferProcessor.reset(GrPorterDuffXPFactory::CreateSrcOverXferProcessor(
*args.fCaps,
args.fOpts,
- builder.hasMixedSamples(),
+ hasMixedSamples,
&args.fDstTexture));
}
- GrColor overrideColor = GrColor_ILLEGAL;
+ GrColor overrideColor = GrColor_ILLEGAL;
if (args.fOpts.fColorPOI.firstEffectiveProcessorIndex() != 0) {
overrideColor = args.fOpts.fColorPOI.inputColorToFirstEffectiveProccesor();
}