4REG_FIDDLE(SkSL_EvaluatingTwoShaders, 128, 128,
false, 5) {
7 const SkPoint pts[] = { { 0, 0 }, { 128, 0 } };
17 "uniform shader input_1;"
18 "uniform shader input_2;"
19 "half4 main(float2 coord) {"
20 " return input_1.eval(coord) * input_2.eval(coord);"
23 makeGradientShader() };
34 p.setShader(myShader);
constexpr SkColor SK_ColorBLACK
constexpr SkColor SK_ColorWHITE
REG_FIDDLE(SkSL_EvaluatingTwoShaders, 128, 128, false, 5)
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
void drawPaint(const SkPaint &paint)
static sk_sp< SkShader > MakeLinear(const SkPoint pts[2], const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
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
PODArray< SkColor > colors
SkSamplingOptions(SkFilterMode::kLinear))