4REG_FIDDLE(Image_RasterFromData, 256, 256,
false, 3) {
REG_FIDDLE(Image_RasterFromData, 256, 256, false, 3)
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
SK_API int SkColorTypeBytesPerPixel(SkColorType ct)
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
static sk_sp< SkData > MakeUninitialized(size_t length)
bool readPixels(GrDirectContext *context, const SkImageInfo &dstInfo, void *dstPixels, size_t dstRowBytes, int srcX, int srcY, CachingHint cachingHint=kAllow_CachingHint) const
@ kAllow_CachingHint
allows internally caching decoded and copied pixels
SK_API sk_sp< SkImage > RasterFromData(const SkImageInfo &info, sk_sp< SkData > pixels, size_t rowBytes)
sk_sp< const SkImage > image
static SkImageInfo MakeN32(int width, int height, SkAlphaType at)
SkImageInfo makeColorType(SkColorType newColorType) const
std::shared_ptr< const fml::Mapping > data