109 std::optional<SkAlphaType> alphaType = std::nullopt);
285 int width()
const {
return fInfo.width(); }
291 int height()
const {
return fInfo.height(); }
369 bool isAlphaOnly()
const;
381 const SkMatrix* localMatrix =
nullptr)
const;
387 const SkMatrix* lm =
nullptr)
const;
403 const SkMatrix* localMatrix =
nullptr)
const;
409 const SkMatrix* lm =
nullptr)
const;
420 bool peekPixels(
SkPixmap* pixmap)
const;
506 CachingHint cachingHint = kAllow_CachingHint)
const;
543 CachingHint cachingHint = kAllow_CachingHint)
const;
545#if defined(GRAPHITE_TEST_UTILS)
552#ifndef SK_IMAGE_READ_PIXELS_DISABLE_LEGACY_API
554 bool readPixels(
const SkImageInfo& dstInfo,
void* dstPixels,
size_t dstRowBytes,
555 int srcX,
int srcY, CachingHint cachingHint = kAllow_CachingHint)
const;
556 bool readPixels(
const SkPixmap&
dst,
int srcX,
int srcY,
557 CachingHint cachingHint = kAllow_CachingHint)
const;
570 virtual const void*
data(
int i)
const = 0;
702 CachingHint cachingHint = kAllow_CachingHint)
const;
776 bool hasMipmaps()
const;
781 bool isProtected()
const;
815 CachingHint cachingHint = kDisallow_CachingHint)
const;
817#if !defined(SK_IMAGE_READ_PIXELS_DISABLE_LEGACY_API)
819 return this->makeRasterImage(
nullptr, cachingHint);
840 LegacyBitmapMode legacyBitmapMode = kRO_LegacyBitmapMode)
const;
941 const uint32_t fUniqueID;
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
static bool SkAlphaTypeIsOpaque(SkAlphaType at)
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
AsyncReadResult(const AsyncReadResult &)=delete
virtual ~AsyncReadResult()=default
AsyncReadResult & operator=(AsyncReadResult &&)=delete
virtual size_t rowBytes(int i) const =0
AsyncReadResult & operator=(const AsyncReadResult &)=delete
virtual int count() const =0
AsyncReadResult(AsyncReadResult &&)=delete
virtual const void * data(int i) const =0
AsyncReadResult()=default
virtual sk_sp< SkImage > makeColorSpace(skgpu::graphite::Recorder *, sk_sp< SkColorSpace > targetColorSpace, RequiredProperties) const =0
virtual sk_sp< SkImage > makeColorSpace(GrDirectContext *direct, sk_sp< SkColorSpace > target) const =0
const SkImageInfo & imageInfo() const
virtual sk_sp< SkImage > makeColorTypeAndColorSpace(skgpu::graphite::Recorder *, SkColorType targetColorType, sk_sp< SkColorSpace > targetColorSpace, RequiredProperties) const =0
SkISize dimensions() const
sk_sp< SkImage > makeRasterImage(CachingHint cachingHint=kDisallow_CachingHint) const
uint32_t uniqueID() const
virtual bool isLazyGenerated() const =0
virtual sk_sp< SkImage > makeSubset(skgpu::graphite::Recorder *, const SkIRect &subset, RequiredProperties) const =0
virtual sk_sp< SkImage > makeColorTypeAndColorSpace(GrDirectContext *direct, SkColorType targetColorType, sk_sp< SkColorSpace > targetCS) const =0
virtual bool isValid(GrRecordingContext *context) const =0
virtual bool isTextureBacked() const =0
virtual size_t textureSize() const =0
@ kDisallow_CachingHint
disallows internally caching decoded and copied pixels
@ kAllow_CachingHint
allows internally caching decoded and copied pixels
void(ReadPixelsContext, std::unique_ptr< const AsyncReadResult >) ReadPixelsCallback
virtual sk_sp< SkImage > makeSubset(GrDirectContext *direct, const SkIRect &subset) const =0
@ kRO_LegacyBitmapMode
returned bitmap is read-only and immutable
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
SkImage::ReadPixelsContext ReadPixelsContext
SkImage::ReadPixelsCallback ReadPixelsCallback
SK_API sk_sp< SkImage > DeferredFromPicture(sk_sp< SkPicture > picture, const SkISize &dimensions, const SkMatrix *matrix, const SkPaint *paint, BitDepth bitDepth, sk_sp< SkColorSpace > colorSpace, SkSurfaceProps props)
SK_API sk_sp< SkImage > RasterFromData(const SkImageInfo &info, sk_sp< SkData > pixels, size_t rowBytes)
SK_API sk_sp< SkImage > DeferredFromEncodedData(sk_sp< SkData > encoded, std::optional< SkAlphaType > alphaType=std::nullopt)
SK_API sk_sp< SkImage > RasterFromPixmap(const SkPixmap &pixmap, RasterReleaseProc rasterReleaseProc, ReleaseContext releaseContext)
SK_API sk_sp< SkImage > DeferredFromGenerator(std::unique_ptr< SkImageGenerator > imageGenerator)
SK_API sk_sp< SkImage > RasterFromBitmap(const SkBitmap &bitmap)
SK_API sk_sp< SkImage > RasterFromPixmapCopy(const SkPixmap &pixmap)
@ kF16
uses 16-bit float per color component
@ kU8
uses 8-bit unsigned int per color component
SK_API sk_sp< SkImage > MakeWithFilter(sk_sp< SkImage > src, const SkImageFilter *filter, const SkIRect &subset, const SkIRect &clipBounds, SkIRect *outSubset, SkIPoint *offset)
SK_API sk_sp< SkImage > RasterFromCompressedTextureData(sk_sp< SkData > data, int width, int height, SkTextureCompressionType type)
void(const void *pixels, ReleaseContext) RasterReleaseProc
unsigned useCenter Optional< SkMatrix > matrix
sk_sp< const SkPicture > picture
SkSamplingOptions sampling
static constexpr SkIRect MakeWH(int32_t w, int32_t h)
static constexpr SkISize Make(int32_t w, int32_t h)
bool operator!=(const RequiredProperties &other) const
bool operator==(const RequiredProperties &other) const
bool operator<(const RequiredProperties &other) const
std::shared_ptr< const fml::Mapping > data