5REG_FIDDLE(Surface_MakeRasterDirect, 256, 256,
true, 0) {
8 const size_t size =
info.computeMinByteSize();
16 for (
int y = 0;
y <
info.height(); ++
y) {
17 for (
int x = 0;
x <
info.width(); ++
x) {
18 SkDebugf(
"%c", *pixels++ == pmWhite ?
'-' :
'x');
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
constexpr SkColor SK_ColorWHITE
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
void drawPoint(SkScalar x, SkScalar y, const SkPaint &paint)
void clear(SkColor color)
#define REG_FIDDLE(NAME, W, H, TEXT, I)
SK_API sk_sp< SkSurface > WrapPixels(const SkImageInfo &imageInfo, void *pixels, size_t rowBytes, const SkSurfaceProps *surfaceProps=nullptr)
static SkImageInfo MakeN32Premul(int width, int height)