4REG_FIDDLE(SkSL_CoordinateSpaces, 128, 128,
false, 5) {
7 "uniform shader image;"
8 "half4 main(float2 coord) {"
9 " coord.x += sin(coord.y / 3) * 4;"
10 " return image.eval(coord);"
30 p.setShader(myShader);
REG_FIDDLE(SkSL_CoordinateSpaces, 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))