29 printf(
"Cannot open output file %s\n",
argv[1]);
36 printf(
"Could not make metal context\n");
39 printf(
"Context made, now to make the surface\n");
47 printf(
"Could not make surface from Metal DirectContext\n");
57 paint.setAntiAlias(
true);
63 printf(
"Drew to surface, now doing readback\n");
67 printf(
"Readback of pixels (or encoding) failed\n");
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
constexpr SkColor SK_ColorMAGENTA
constexpr SkColor SK_ColorCYAN
GrSemaphoresSubmitted flush(const GrFlushInfo &info)
void clear(SkColor color)
void drawRRect(const SkRRect &rrect, const SkPaint &paint)
const void * data() const
static SkRRect MakeRectXY(const SkRect &rect, SkScalar xRad, SkScalar yRad)
GrMtlBackendContext GetMetalContext()
SK_API sk_sp< GrDirectContext > MakeMetal(const GrMtlBackendContext &, const GrContextOptions &)
SK_API bool Encode(SkWStream *dst, const SkPixmap &src, const Options &options)
std::string printf(const char *fmt,...) SK_PRINTF_LIKE(1
SK_API sk_sp< SkSurface > RenderTarget(GrRecordingContext *context, skgpu::Budgeted budgeted, const SkImageInfo &imageInfo, int sampleCount, GrSurfaceOrigin surfaceOrigin, const SkSurfaceProps *surfaceProps, bool shouldCreateWithMips=false, bool isProtected=false)
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)