Make mixed samples detection automatic
Previously, we relied on ops to deduce whether a draw would have
hardware coverage modulation as a result mixed samples. This is
problematic because *any* draw can have mixed samples coverage if
there is a multisampled stencil clip. No ops were checking for stencil
clip, and most just said they never used mixed samples.
Now that the only usecase for mixed samples is the stencil buffer,
this CL makes the processorSet automatically deduce mixed samples
coverage from the stencil settings and fsaaType.
Bug: skia:
Change-Id: Ib69b84bc03b12f6efb8e7d6ed721ae1612785315
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/197281
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
diff --git a/tests/ProcessorTest.cpp b/tests/ProcessorTest.cpp
index d5b27ab..09f24b52 100644
--- a/tests/ProcessorTest.cpp
+++ b/tests/ProcessorTest.cpp
@@ -45,11 +45,13 @@
FixedFunctionFlags fixedFunctionFlags() const override { return FixedFunctionFlags::kNone; }
- GrProcessorSet::Analysis finalize(const GrCaps& caps, const GrAppliedClip* clip) override {
+ GrProcessorSet::Analysis finalize(
+ const GrCaps& caps, const GrAppliedClip* clip, GrFSAAType fsaaType) override {
static constexpr GrProcessorAnalysisColor kUnknownColor;
SkPMColor4f overrideColor;
- return fProcessors.finalize(kUnknownColor, GrProcessorAnalysisCoverage::kNone, clip, false,
- caps, &overrideColor);
+ return fProcessors.finalize(
+ kUnknownColor, GrProcessorAnalysisCoverage::kNone, clip,
+ &GrUserStencilSettings::kUnused, fsaaType, caps, &overrideColor);
}
private: