Convert internal SkSL to use .eval()
Also update RELEASE_NOTES to describe new syntax.
Change-Id: I2666551b98f80b61ae3a48c92a9e306cdc7242b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444735
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 b7c8b4d..0d5f537 100644
--- a/src/gpu/GrFragmentProcessor.cpp
+++ b/src/gpu/GrFragmentProcessor.cpp
@@ -405,7 +405,7 @@
uniform colorFilter fp; // Declared as colorFilter so we can pass a color
uniform half4 color;
half4 main(half4 inColor) {
- return filter(fp, color);
+ return fp.eval(color);
}
)");
SkASSERT(SkRuntimeEffectPriv::SupportsConstantOutputForConstantInput(effect));
@@ -423,7 +423,7 @@
static auto effect = SkMakeRuntimeEffect(SkRuntimeEffect::MakeForBlender, R"(
uniform colorFilter fp; // Declared as colorFilter so we can pass a color
half4 main(half4 src, half4 dst) {
- return filter(fp, dst);
+ return fp.eval(dst);
}
)");
return GrSkSLFP::Make(effect, "UseDestColorAsInput", /*inputFP=*/nullptr,
@@ -440,7 +440,7 @@
static auto effect = SkMakeRuntimeEffect(SkRuntimeEffect::MakeForColorFilter, R"(
uniform colorFilter fp; // Declared as colorFilter so we can pass a color
half4 main(half4 inColor) {
- return inColor.a * filter(fp, unpremul(inColor).rgb1);
+ return inColor.a * fp.eval(unpremul(inColor).rgb1);
}
)");
return GrSkSLFP::Make(effect,