24 "half4 main(half4 src, half4 dst) { return ((dst.rgb - 0.25) * 16).rgb1; }"))
29 if (!canvas->getSurface()) {
33 *errorMsg =
"Not supported in recording mode";
47 surface->getCanvas()->drawPaint(gradientPaint);
56 canvas->translate(5, 5);
58 canvas->drawImage(
image, 0, 0);
59 canvas->translate(105, 0);
64 canvas->drawRect({0, 0, 100, 100}, imageShaderPaint);
65 canvas->translate(105, 0);
70 canvas->translate(105, 0);
74 canvas->drawRect({0, 0, 100, 100}, gradientPaint);
78 canvas->drawPaint(colorStretchPaint);
static const int points[]
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
@ kRGBA_F16_SkColorType
pixel with half floats for red, green, blue, alpha;
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
void setDither(bool dither)
void setShader(sk_sp< SkShader > shader)
void setBlender(sk_sp< SkBlender > blender)
sk_sp< SkBlender > makeBlender(sk_sp< const SkData > uniforms, SkSpan< const ChildPtr > children={}) const
static Result MakeForBlender(SkString sksl, const Options &)
sk_sp< SkBlender > stretch_colors_blender()
DEF_SIMPLE_GM_CAN_FAIL(image_dither, canvas, errorMsg, 425, 110)
sk_sp< const SkImage > image
PODArray< SkColor > colors
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)
sk_sp< SkRuntimeEffect > effect