Update existing TestCreate methods to honor the inputFP in the TestData.
This can be leveraged to build chains of test FPs in a controlled way.
At present, `inputFP` it is never set to anything other than null; as
such, all calls to TestCreate continue to set a null inputFP
(exactly as they do already).
Change-Id: I0d74f37a076ca338e44ff734816299beb1667c26
Bug: skia:10384
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302668
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
diff --git a/src/gpu/effects/generated/GrCircleEffect.cpp b/src/gpu/effects/generated/GrCircleEffect.cpp
index 83730bc..3ac51c3 100644
--- a/src/gpu/effects/generated/GrCircleEffect.cpp
+++ b/src/gpu/effects/generated/GrCircleEffect.cpp
@@ -128,10 +128,10 @@
center.fY = testData->fRandom->nextRangeScalar(0.f, 1000.f);
SkScalar radius = testData->fRandom->nextRangeF(1.f, 1000.f);
bool success;
- std::unique_ptr<GrFragmentProcessor> fp;
+ std::unique_ptr<GrFragmentProcessor> fp = testData->inputFP();
do {
GrClipEdgeType et = (GrClipEdgeType)testData->fRandom->nextULessThan(kGrClipEdgeTypeCnt);
- std::tie(success, fp) = GrCircleEffect::Make(/*inputFP=*/nullptr, et, center, radius);
+ std::tie(success, fp) = GrCircleEffect::Make(std::move(fp), et, center, radius);
} while (!success);
return fp;
}