8#ifndef SkImage_Base_DEFINED
9#define SkImage_Base_DEFINED
74#if defined(GRAPHITE_TEST_UTILS)
78 int srcY)
const {
return false; }
175 fAddedToRasterCache.store(
true);
198 mutable std::atomic<bool> fAddedToRasterCache;
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
static SkImage_Base * as_IB(SkImage *image)
sk_sp< T > sk_ref_sp(T *obj)
virtual sk_sp< SkImage > onMakeWithMipmaps(sk_sp< SkMipmap >) const
virtual void generatingSurfaceIsDeleted()
sk_sp< SkMipmap > refMips() const
virtual bool onAsLegacyBitmap(GrDirectContext *, SkBitmap *) const
virtual GrDirectContext * directContext() const
bool isRasterBacked() const
virtual sk_sp< SkImage > onMakeSubset(GrDirectContext *, const SkIRect &) const =0
virtual sk_sp< SkImage > onReinterpretColorSpace(sk_sp< SkColorSpace >) const =0
sk_sp< SkImage > makeSubset(GrDirectContext *direct, const SkIRect &subset) const override
virtual sk_sp< SkImage > onMakeSubset(skgpu::graphite::Recorder *, const SkIRect &, RequiredProperties) const =0
virtual GrImageContext * context() const
sk_sp< SkImage > makeColorTypeAndColorSpace(GrDirectContext *dContext, SkColorType targetColorType, sk_sp< SkColorSpace > targetCS) const override
bool isLazyGenerated() const override
virtual sk_sp< SkImage > onMakeColorTypeAndColorSpace(SkColorType, sk_sp< SkColorSpace >, GrDirectContext *) const =0
bool isGaneshBacked() const
virtual bool onReadPixels(GrDirectContext *, const SkImageInfo &dstInfo, void *dstPixels, size_t dstRowBytes, int srcX, int srcY, CachingHint) const =0
virtual sk_sp< SkData > onRefEncoded() const
virtual bool onIsProtected() const =0
virtual SkMipmap * onPeekMips() const
virtual bool getROPixels(GrDirectContext *, SkBitmap *, CachingHint=kAllow_CachingHint) const =0
bool isTextureBacked() const override
sk_sp< SkImage > makeColorSpace(GrDirectContext *, sk_sp< SkColorSpace >) const override
virtual bool onHasMipmaps() const =0
virtual bool onPeekPixels(SkPixmap *) const
virtual void notifyAddedToRasterCache() const
virtual Type type() const =0
virtual void onAsyncRescaleAndReadPixelsYUV420(SkYUVColorSpace, bool readAlpha, sk_sp< SkColorSpace > dstColorSpace, SkIRect srcRect, SkISize dstSize, RescaleGamma, RescaleMode, ReadPixelsCallback, ReadPixelsContext) const
virtual const SkBitmap * onPeekBitmap() const
size_t textureSize() const override
virtual void onAsyncRescaleAndReadPixels(const SkImageInfo &, SkIRect srcRect, RescaleGamma, RescaleMode, ReadPixelsCallback, ReadPixelsContext) const
bool isGraphiteBacked() const
uint32_t uniqueID() const
friend class SkImage_Base
@ kAllow_CachingHint
allows internally caching decoded and copied pixels
@ kRaster
Suitable for thread which raster data.
SkImage::ReadPixelsContext ReadPixelsContext
SkImage::ReadPixelsCallback ReadPixelsCallback
sk_sp< const SkImage > image