Remove explicit sample flag from GrFP.
Instead expand the map that is computed by GrGLSLGP to include a bool
that indicates whether each FP requires coords or not.
Now GrGLSLGP is solely responsible for determining which FPs take coords
and inserting any varyings. The rest of the system follows its lead when
generating FP functions and call sites.
Bug: skia:12198
Change-Id: I3471867fb64e94c7775c0b6209998159abeb6714
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435018
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
diff --git a/tests/ProcessorTest.cpp b/tests/ProcessorTest.cpp
index a6f8188..01be63a 100644
--- a/tests/ProcessorTest.cpp
+++ b/tests/ProcessorTest.cpp
@@ -806,9 +806,9 @@
"\n%s", fp.dumpTreeInfo().c_str());
REPORTER_ASSERT(reporter, fp.numChildProcessors() == clone.numChildProcessors(),
"\n%s", fp.dumpTreeInfo().c_str());
- REPORTER_ASSERT(reporter, fp.usesVaryingCoords() == clone.usesVaryingCoords(),
+ REPORTER_ASSERT(reporter, fp.sampleUsage() == clone.sampleUsage(),
"\n%s", fp.dumpTreeInfo().c_str());
- REPORTER_ASSERT(reporter, fp.referencesSampleCoords() == clone.referencesSampleCoords(),
+ REPORTER_ASSERT(reporter, fp.usesSampleCoords() == clone.usesSampleCoords(),
"\n%s", fp.dumpTreeInfo().c_str());
}
diff --git a/tests/SkRuntimeEffectTest.cpp b/tests/SkRuntimeEffectTest.cpp
index c139588..d5409e4 100644
--- a/tests/SkRuntimeEffectTest.cpp
+++ b/tests/SkRuntimeEffectTest.cpp
@@ -893,8 +893,8 @@
"child", std::move(child));
REPORTER_ASSERT(r, fp);
- REPORTER_ASSERT(r, fp->childProcessor(0)->isSampledWithExplicitCoords() == expectExplicit);
- REPORTER_ASSERT(r, fp->referencesSampleCoords() == expectReferencesSampleCoords);
+ REPORTER_ASSERT(r, fp->childProcessor(0)->sampleUsage().isExplicit() == expectExplicit);
+ REPORTER_ASSERT(r, fp->usesSampleCoords() == expectReferencesSampleCoords);
};
// Cases where our optimization is valid, and works: