Avoid passing gradient-layout Y coordinate to colorizer.
The Y coordinate isn't meant to be interpreted as a coordinate. It's
used as a side channel for the discard signal.
Change-Id: Idbdd470c78c49a8b0a28eb05a93905c95b3282d1
Bug: skia:10548
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307297
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
diff --git a/src/gpu/gradients/generated/GrClampedGradientEffect.cpp b/src/gpu/gradients/generated/GrClampedGradientEffect.cpp
index 2f5b0a3..29a8644 100644
--- a/src/gpu/gradients/generated/GrClampedGradientEffect.cpp
+++ b/src/gpu/gradients/generated/GrClampedGradientEffect.cpp
@@ -51,8 +51,8 @@
args.fOutputColor, args.fOutputColor,
args.fUniformHandler->getUniformCStr(leftBorderColorVar), args.fOutputColor,
args.fUniformHandler->getUniformCStr(rightBorderColorVar));
- SkString _coords1767("float2(t.xy)");
- SkString _sample1767 = this->invokeChild(0, args, _coords1767.c_str());
+ SkString _coords1868("float2(half2(t.x, 0))");
+ SkString _sample1868 = this->invokeChild(0, args, _coords1868.c_str());
fragBuilder->codeAppendf(
R"SkSL(
%s = %s;
@@ -61,7 +61,7 @@
%s.xyz *= %s.w;
}
)SkSL",
- args.fOutputColor, _sample1767.c_str(), (_outer.makePremul ? "true" : "false"),
+ args.fOutputColor, _sample1868.c_str(), (_outer.makePremul ? "true" : "false"),
args.fOutputColor, args.fOutputColor);
}