Eliminate mixed samples as an FBO type or AA type
From now on, sample counts always refer to the number of actual color
samples, and render targets don't have separate color and stencil
sample counts.
If mixed samples support is available when making a
"GrAAType::kCoverage" draw, then an op may attach and use a mixed
sampled stencil buffer internally. But this will all be invisible to
the client.
After this CL, we temporarily won't have a mode to use nvpr with mixed
samples. That will soon be fixed by a follow-on CL that enables nvpr
with mixed samples in the normal "gl" and "gles" configs.
Bug: skia:
Change-Id: I1cb8277f0d2d0d371f24bb9f39cd473ed5c5c83b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221878
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/ccpr/GrCCDrawPathsOp.cpp b/src/gpu/ccpr/GrCCDrawPathsOp.cpp
index b8c5a01..b1e5ab8 100644
--- a/src/gpu/ccpr/GrCCDrawPathsOp.cpp
+++ b/src/gpu/ccpr/GrCCDrawPathsOp.cpp
@@ -146,18 +146,19 @@
#endif
}
-GrProcessorSet::Analysis GrCCDrawPathsOp::finalize(const GrCaps& caps, const GrAppliedClip* clip,
- GrFSAAType fsaaType, GrClampType clampType) {
+GrProcessorSet::Analysis GrCCDrawPathsOp::finalize(
+ const GrCaps& caps, const GrAppliedClip* clip, bool hasMixedSampledCoverage,
+ GrClampType clampType) {
SkASSERT(1 == fNumDraws); // There should only be one single path draw in this Op right now.
- return fDraws.head().finalize(caps, clip, fsaaType, clampType, &fProcessors);
+ return fDraws.head().finalize(caps, clip, hasMixedSampledCoverage, clampType, &fProcessors);
}
GrProcessorSet::Analysis GrCCDrawPathsOp::SingleDraw::finalize(
- const GrCaps& caps, const GrAppliedClip* clip, GrFSAAType fsaaType, GrClampType clampType,
- GrProcessorSet* processors) {
+ const GrCaps& caps, const GrAppliedClip* clip, bool hasMixedSampledCoverage, GrClampType
+ clampType, GrProcessorSet* processors) {
const GrProcessorSet::Analysis& analysis = processors->finalize(
fColor, GrProcessorAnalysisCoverage::kSingleChannel, clip,
- &GrUserStencilSettings::kUnused, fsaaType, caps, clampType, &fColor);
+ &GrUserStencilSettings::kUnused, hasMixedSampledCoverage, caps, clampType, &fColor);
// Lines start looking jagged when they get thinner than 1px. For thin strokes it looks better
// if we can convert them to hairline (i.e., inflate the stroke width to 1px), and instead