4REG_FIDDLE(Bitmap_tryAllocPixels_2, 256, 256,
false, 3) {
9 offscreen.
scale(.25f, .5f);
10 for (
int y : { 0, 64, 128, 192 } ) {
REG_FIDDLE(Bitmap_tryAllocPixels_2, 256, 256, false, 3)
@ kOpaque_SkAlphaType
pixel is opaque
@ kGray_8_SkColorType
pixel with grayscale level in 8-bit byte
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
sk_sp< SkImage > asImage() const
void scale(SkScalar sx, SkScalar sy)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)