4REG_FIDDLE(SkSL_EvaluatingNestedShaders, 128, 128,
false, 5) {
8 "half4 main(float2 coord) {"
9 " float t = coord.x / 128;"
10 " half4 white = half4(1);"
11 " half4 black = half4(0,0,0,1);"
12 " return mix(white, black, t);"
15 return effect->makeShader(
nullptr, {});
23 "uniform shader input_1;"
24 "uniform shader input_2;"
25 "half4 main(float2 coord) {"
26 " return input_1.eval(coord) * input_2.eval(coord);"
29 makeGradientShader() };
40 p.setShader(myShader);
REG_FIDDLE(SkSL_EvaluatingNestedShaders, 128, 128, false, 5)
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
void drawPaint(const SkPaint &paint)
sk_sp< SkShader > makeShader(SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &, const SkMatrix *localMatrix=nullptr) const
static Result MakeForShader(SkString sksl, const Options &)
sk_sp< const SkImage > image
SkSamplingOptions(SkFilterMode::kLinear))