4 {
8
10 if (!context) {
12 return;
13 }
15 if (!direct) {
17 return;
18 }
19
27 return;
28 }
29
31 textureFromImage,
35 canvas->
drawImage(imageFromTexture, 0, 0);
36 canvas->
drawImage(imageFromBackend, 128, 128);
37}
38}
@ kBottomLeft_GrSurfaceOrigin
@ kTopLeft_GrSurfaceOrigin
@ 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.