Remove support for multiple coverage processors from GrPaint API.
Change-Id: I82276e38ea4a5524127176eb5a34066b6cb06d88
Bug: skia:10217
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304799
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
diff --git a/tests/ProgramsTest.cpp b/tests/ProgramsTest.cpp
index afa3e13..dfbcb47 100644
--- a/tests/ProgramsTest.cpp
+++ b/tests/ProgramsTest.cpp
@@ -232,19 +232,14 @@
paint->setColorFragmentProcessor(std::move(fp));
}
} else {
- int numProcs = d->fRandom->nextULessThan(maxStages + 1);
- int numColorProcs = 1;
-
- for (int s = 0; s < numProcs; ++s) {
- std::unique_ptr<GrFragmentProcessor> fp(GrFragmentProcessorTestFactory::Make(d));
- if (!fp) {
- continue;
- }
- // finally add the stage to the correct pipeline in the drawstate
- if (s < numColorProcs) {
+ if (maxStages >= 1) {
+ if (std::unique_ptr<GrFragmentProcessor> fp = GrFragmentProcessorTestFactory::Make(d)) {
paint->setColorFragmentProcessor(std::move(fp));
- } else {
- paint->addCoverageFragmentProcessor(std::move(fp));
+ }
+ }
+ if (maxStages >= 2) {
+ if (std::unique_ptr<GrFragmentProcessor> fp = GrFragmentProcessorTestFactory::Make(d)) {
+ paint->setCoverageFragmentProcessor(std::move(fp));
}
}
}