25#if defined(SK_GRAPHITE)
37 return surface->makeImageSnapshot();
45 size_t rowBytes,
const Options&)
override {
60const MakerT makers[] = {
73#if defined(SK_GRAPHITE)
91 paint.setColor(0xff00ff00);
95 for (
size_t i = 0; i < std::size(makers); ++i) {
105#if defined(SK_GRAPHITE)
110 canvas->drawImageRect(subset, kDest.
makeOffset(
kSize.width() * 1.5f, 0),
113 canvas->translate(0,
kSize.height() * 1.5f);
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
static GrDirectContext * GrAsDirectContext(GrContext_Base *base)
@ kAlpha_8_SkColorType
pixel with alpha in 8-bit byte
#define INHERITED(method,...)
virtual GrRecordingContext * recordingContext() const
virtual skgpu::graphite::Recorder * recorder() const
@ kStrict_SrcRectConstraint
sample only inside bounds; slower
virtual bool onGetPixels(const SkImageInfo &, void *, size_t, const Options &)
virtual sk_sp< SkImage > makeSubset(GrDirectContext *direct, const SkIRect &subset) const =0
static constexpr int kSize
#define DEF_SIMPLE_GM(NAME, CANVAS, W, H)
SK_API sk_sp< SkImage > DeferredFromGenerator(std::unique_ptr< SkImageGenerator > imageGenerator)
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
SK_API sk_sp< SkSurface > WrapPixels(const SkImageInfo &imageInfo, void *pixels, size_t rowBytes, const SkSurfaceProps *surfaceProps=nullptr)
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 constexpr SkIRect MakeLTRB(int32_t l, int32_t t, int32_t r, int32_t b)
static constexpr SkISize Make(int32_t w, int32_t h)
SkImageInfo makeColorSpace(sk_sp< SkColorSpace > cs) const
static SkImageInfo MakeA8(int width, int height)
static SkRect Make(const SkISize &size)
constexpr SkRect makeOffset(float dx, float dy) const
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)