don't create SkDevice directly, use SkBitmap or (better) SkCanvas::NewRaster factory