4REG_FIDDLE(draw_pixel_array_nocopy, 256, 256,
false, 5) {
8 0xFF000000, 0xFF005500, 0xFF00AA00, 0xFF00FF00,
9 0xFF000055, 0xFF005555, 0xFF00AA55, 0xFF00FF55,
10 0xFF0000AA, 0xFF0055AA, 0xFF00AAAA, 0xFF00FFAA,
11 0xFF0000FF, 0xFF0055FF, 0xFF00AAFF, 0xFF00FFFF,
16 kPixels,
sizeof(uint32_t) *
kWidth);
19 canvas->
scale(16, 16);
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
void scale(SkScalar sx, SkScalar sy)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
REG_FIDDLE(draw_pixel_array_nocopy, 256, 256, false, 5)
SK_API sk_sp< SkImage > RasterFromPixmap(const SkPixmap &pixmap, RasterReleaseProc rasterReleaseProc, ReleaseContext releaseContext)
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)