4REG_FIDDLE(Surface_MakeRenderTarget, 256, 64,
false, 0) {
18 auto surfaceCanvas = gpuSurface->getCanvas();
20 surfaceCanvas->drawString(
"GPU rocks!", 20, 40,
font,
paint);
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
static GrDirectContext * GrAsDirectContext(GrContext_Base *base)
@ kBottomLeft_GrSurfaceOrigin
@ kTopLeft_GrSurfaceOrigin
@ kOpaque_SkAlphaType
pixel is opaque
constexpr SkColor SK_ColorWHITE
REG_FIDDLE(Surface_MakeRenderTarget, 256, 64, false, 0)
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
void translate(SkScalar dx, SkScalar dy)
virtual GrRecordingContext * recordingContext() const
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
sk_sp< SkTypeface > matchFamilyStyle(const char familyName[], const SkFontStyle &) const
sk_sp< SkFontMgr > fontMgr
sk_sp< const SkImage > image
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)
font
Font Metadata and Metrics.
static SkImageInfo MakeN32(int width, int height, SkAlphaType at)