4REG_FIDDLE(Image_GetBackendTextureFromImage, 256, 256,
false, 3) {
35 canvas->
drawImage(imageFromTexture, 0, 0);
36 canvas->
drawImage(imageFromBackend, 128, 128);
@ kBottomLeft_GrSurfaceOrigin
@ kTopLeft_GrSurfaceOrigin
REG_FIDDLE(Image_GetBackendTextureFromImage, 256, 256, false, 3)
@ kOpaque_SkAlphaType
pixel is opaque
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
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< SkFontMgr > fontMgr
GrBackendTexture backEndTexture
SK_API sk_sp< SkImage > AdoptTextureFrom(GrRecordingContext *context, const GrBackendTexture &backendTexture, GrSurfaceOrigin textureOrigin, SkColorType colorType)
SK_API bool GetBackendTextureFromImage(const SkImage *img, GrBackendTexture *outTexture, bool flushPendingGrContextIO, GrSurfaceOrigin *origin=nullptr)
font
Font Metadata and Metrics.