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/gradients/GrGradientShader.cpp b/src/gpu/gradients/GrGradientShader.cpp
index 2d5b2cb..b3e2fc1 100644
--- a/src/gpu/gradients/GrGradientShader.cpp
+++ b/src/gpu/gradients/GrGradientShader.cpp
@@ -425,7 +425,7 @@
uniform int layoutPreservesOpacity; // specialized
half4 main(float2 coord) {
- half4 t = shade(gradLayout, coord);
+ half4 t = gradLayout.eval(coord);
half4 outColor;
// If t.x is below 0, use the left border color without invoking the child processor.
@@ -442,7 +442,7 @@
} else {
// Always sample from (x, 0), discarding y, since the layout FP can use y as a
// side-channel.
- outColor = shade(colorizer, t.x0);
+ outColor = colorizer.eval(t.x0);
}
if (bool(makePremul)) {
outColor.rgb *= outColor.a;
@@ -487,7 +487,7 @@
uniform int useFloorAbsWorkaround; // specialized
half4 main(float2 coord) {
- half4 t = shade(gradLayout, coord);
+ half4 t = gradLayout.eval(coord);
if (!bool(layoutPreservesOpacity) && t.y < 0) {
// layout has rejected this fragment (rely on sksl to remove this branch if the
@@ -511,7 +511,7 @@
// Always sample from (x, 0), discarding y, since the layout FP can use y as a
// side-channel.
- half4 outColor = shade(colorizer, t.x0);
+ half4 outColor = colorizer.eval(t.x0);
if (bool(makePremul)) {
outColor.rgb *= outColor.a;
}