4REG_FIDDLE(Surface_WrapBackendTexture, 256, 256,
false, 3) {
28 auto surfaceCanvas = gpuSurface->
getCanvas();
@ kTopLeft_GrSurfaceOrigin
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
REG_FIDDLE(Surface_WrapBackendTexture, 256, 256, false, 3)
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
virtual GrDirectContext * asDirectContext()
virtual GrRecordingContext * recordingContext() const
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
sk_sp< SkTypeface > matchFamilyStyle(const char familyName[], const SkFontStyle &) const
sk_sp< SkImage > makeImageSnapshot()
sk_sp< SkFontMgr > fontMgr
GrBackendTexture backEndTexture
sk_sp< const SkImage > image
SK_API sk_sp< SkSurface > WrapBackendTexture(GrRecordingContext *context, const GrBackendTexture &backendTexture, GrSurfaceOrigin origin, int sampleCnt, SkColorType colorType, sk_sp< SkColorSpace > colorSpace, const SkSurfaceProps *surfaceProps, TextureReleaseProc textureReleaseProc=nullptr, ReleaseContext releaseContext=nullptr)
font
Font Metadata and Metrics.