in regards to the params specified here
is the color obtained from the current paint object?
or from the canvas object's current layer pixels?
// Color filter SkSL requires an entry point that looks like:
// vec4 main(vec4 inColor) { ... }
static Result MakeForColorFilter(SkString sksl, const Options&);
static Result MakeForColorFilter(SkString sksl) {
return MakeForColorFilter(std::move(sksl), Options{});
}
// Shader SkSL requires an entry point that looks like:
// vec4 main(vec2 inCoords) { ... }
// -or-
// vec4 main(vec2 inCoords, vec4 inColor) { ... }
//
// Most shaders don't use the input color, so that parameter is optional.
static Result MakeForShader(SkString sksl, const Options&);
static Result MakeForShader(SkString sksl) {
return MakeForShader(std::move(sksl), Options{});
}
// Blend SkSL requires an entry point that looks like:
// vec4 main(vec4 srcColor, vec4 dstColor) { ... }
static Result MakeForBlender(SkString sksl, const Options&);
static Result MakeForBlender(SkString sksl) {
return MakeForBlender(std::move(sksl), Options{});
}