In runtime effects, treat all children as sampled

An unused child that used its coordinates would triggers asserts in the
GP - we expect that all FPs are sampled/invoked. This generates slightly
sub-optimal code (we compute and interpolate the local coordinates for
that child FP), but it's not likely to happen in real code.

Bug: skia:12429
Change-Id: Ic2ddc65d16a7e1f47af8c4192e5ff9ea329bf335
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/446836
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
diff --git a/src/gpu/GrFragmentProcessor.cpp b/src/gpu/GrFragmentProcessor.cpp
index 0d5f537..390105d 100644
--- a/src/gpu/GrFragmentProcessor.cpp
+++ b/src/gpu/GrFragmentProcessor.cpp
@@ -142,6 +142,8 @@
 
 void GrFragmentProcessor::registerChild(std::unique_ptr<GrFragmentProcessor> child,
                                         SkSL::SampleUsage sampleUsage) {
+    SkASSERT(sampleUsage.isSampled());
+
     if (!child) {
         fChildProcessors.push_back(nullptr);
         return;