15 const char* sksl = R
"(
16 uniform vec4 not_a_color;
17 layout(color) uniform vec4 color;
20 vec4 c = xy.y < 32 ? not_a_color : color;
21 return (c * (xy.x / 128)).rgb1;
28 builder.uniform(
"not_a_color") =
SkV4{ 1, 0, 0, 1 };
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
static sk_sp< SkColorSpace > rec2020()
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
@ kRGBA_F16_SkColorType
pixel with half floats for red, green, blue, alpha;
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
static sk_sp< SkColorSpace > MakeRGB(const skcms_TransferFunction &transferFn, const skcms_Matrix3x3 &toXYZ)
static Result MakeForShader(SkString sksl, const Options &)
static constexpr skcms_Matrix3x3 kRec2020
static constexpr skcms_TransferFunction kLinear
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)