48 void*
addr =
const_cast<void*
>(
data->data());
71 return shallowCopy.
readPixels(dstInfo, dstPixels, dstRowBytes, srcX, srcY);
93 SkDEBUGFAIL(
"SkImage_Raster::onMakeSubset with nullptr src or dst");
109 return copy.asImage();
125 for (
int i = 0;
i <
dst->countLevels(); ++
i) {
128 dst->getLevel(
i, &dstLevel);
156 img = tmp->withMipmaps(std::move(mips));
159 if (!
copy.isNull()) {
160 img =
copy.asImage();
170 uint32_t idForCopy) {
223 return dst.asImage();
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
SkAssertResult(font.textToGlyphs("Hello", 5, SkTextEncoding::kUTF8, glyphs, std::size(glyphs))==count)
#define SkDEBUGFAIL(message)
static bool SkImageInfoIsValid(const SkImageInfo &info)
@ kNever_SkCopyPixelsMode
never copy src pixels (even if they are marked mutable)
@ kAlways_SkCopyPixelsMode
always copy src pixels (even if they are marked immutable)
const SkPixelRef * SkBitmapImageGetPixelRef(const SkImage *image)
static sk_sp< SkMipmap > copy_mipmaps(const SkBitmap &src, SkMipmap *srcMips)
static bool is_not_subset(const SkBitmap &bm)
sk_sp< SkImage > SkMakeImageFromRasterBitmap(const SkBitmap &bm, SkCopyPixelsMode cpm)
sk_sp< SkImage > SkMakeImageFromRasterBitmapPriv(const SkBitmap &bm, SkCopyPixelsMode cpm, uint32_t idForCopy)
static SkBitmap copy_bitmap_subset(const SkBitmap &orig, const SkIRect &subset)
static void release_data(void *addr, void *context)
sk_sp< SkImage > MakeRasterCopyPriv(const SkPixmap &pmap, uint32_t id)
static void SkRectMemcpy(void *dst, size_t dstRB, const void *src, size_t srcRB, size_t trimRowBytes, int rowCount)
sk_sp< T > sk_ref_sp(T *obj)
bool installPixels(const SkImageInfo &info, void *pixels, size_t rowBytes, void(*releaseProc)(void *addr, void *context), void *context)
SkIPoint pixelRefOrigin() const
SkPixelRef * pixelRef() const
bool extractSubset(SkBitmap *dst, const SkIRect &subset) const
SkISize dimensions() const
const SkPixmap & pixmap() const
void * getAddr(int x, int y) const
const SkImageInfo & info() const
bool readPixels(const SkImageInfo &dstInfo, void *dstPixels, size_t dstRowBytes, int srcX, int srcY) const
bool peekPixels(SkPixmap *pixmap) const
virtual bool onAsLegacyBitmap(GrDirectContext *, SkBitmap *) const
bool getROPixels(GrDirectContext *, SkBitmap *, CachingHint) const override
sk_sp< SkImage > onMakeSubset(GrDirectContext *, const SkIRect &) const override
bool onPeekPixels(SkPixmap *) const override
bool onAsLegacyBitmap(GrDirectContext *, SkBitmap *) const override
~SkImage_Raster() override
bool onReadPixels(GrDirectContext *, const SkImageInfo &, void *, size_t, int srcX, int srcY, CachingHint) const override
sk_sp< SkImage > onReinterpretColorSpace(sk_sp< SkColorSpace >) const override
sk_sp< SkImage > onMakeColorTypeAndColorSpace(SkColorType, sk_sp< SkColorSpace >, GrDirectContext *) const override
const SkImageInfo & imageInfo() const
friend class SkImage_Raster
static SkMipmap * Build(const SkPixmap &src, SkDiscardableFactoryProc, bool computeContents=true)
bool validForRootLevel(const SkImageInfo &) const
bool getLevel(int index, Level *) const
bool readPixels(const SkImageInfo &dstInfo, void *dstPixels, size_t dstRowBytes) const
void setColorSpace(sk_sp< SkColorSpace > colorSpace)
SK_API sk_sp< SkImage > RasterFromPixmapCopy(const SkPixmap &pixmap)
sk_sp< const SkImage > image
constexpr int32_t y() const
constexpr int32_t x() const
constexpr int32_t x() const
constexpr int32_t y() const
constexpr SkISize size() const
constexpr int32_t height() const
static constexpr SkIRect MakeSize(const SkISize &size)
static constexpr SkISize Make(int32_t w, int32_t h)
size_t minRowBytes() const
SkImageInfo makeDimensions(SkISize newSize) const
SkImageInfo makeColorSpace(sk_sp< SkColorSpace > cs) const
SkImageInfo makeColorType(SkColorType newColorType) const
std::shared_ptr< const fml::Mapping > data