Make invokeChild default to fInputColor, rather than half4(1)
By extension, this changes the default behavior of sample() in .fp
files. This lets us remove the explicit fInputColor/sk_InColor
arguments everywhere. Most sites that were using the default no
longer care what's passed, as the child is known to be a texture
effect that will ignore the input color. The few remaining sites
now explicitly pass half4(1) when necessary.
Change-Id: Ie4691b049f905d098e9befe8bd07706a496f2968
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303356
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
diff --git a/src/gpu/effects/generated/GrDeviceSpaceEffect.cpp b/src/gpu/effects/generated/GrDeviceSpaceEffect.cpp
index b765e33..af07aa4 100644
--- a/src/gpu/effects/generated/GrDeviceSpaceEffect.cpp
+++ b/src/gpu/effects/generated/GrDeviceSpaceEffect.cpp
@@ -23,9 +23,8 @@
GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder;
const GrDeviceSpaceEffect& _outer = args.fFp.cast<GrDeviceSpaceEffect>();
(void)_outer;
- SkString _input203(args.fInputColor);
SkString _coords203("sk_FragCoord.xy");
- SkString _sample203 = this->invokeChild(0, _input203.c_str(), args, _coords203.c_str());
+ SkString _sample203 = this->invokeChild(0, args, _coords203.c_str());
fragBuilder->codeAppendf(
R"SkSL(%s = %s;
)SkSL",