43 size_t dstRowBytes,
int srcX,
int srcY,
CachingHint chint)
const {
44 return as_IB(
this)->
onReadPixels(dContext, dstInfo, dstPixels, dstRowBytes, srcX, srcY, chint);
47#ifndef SK_IMAGE_READ_PIXELS_DISABLE_LEGACY_API
49 size_t dstRowBytes,
int srcX,
int srcY,
CachingHint chint)
const {
51 return this->
readPixels(dContext, dstInfo, dstPixels, dstRowBytes, srcX, srcY, chint);
55#if defined(GRAPHITE_TEST_UTILS)
60 return as_IB(
this)->onReadPixelsGraphite(recorder,
dst, srcX, srcY);
76 info, srcRect, rescaleGamma, rescaleMode,
callback, context);
88 (dstSize.
width() & 0b1) || (dstSize.
height() & 0b1)) {
94 std::move(dstColorSpace),
112 (dstSize.
width() & 0b1) || (dstSize.
height() & 0b1)) {
118 std::move(dstColorSpace),
131 if (this->
width() == dst.
width() && this->height() ==
dst.height()) {
139 if (
as_IB(
this)->getROPixels(dContext, &bm, chint)) {
181 const SkMatrix* localMatrix)
const {
201 const SkMatrix* localMatrix)
const {
209 const SkMatrix* localMatrix)
const {
226#ifndef SK_IMAGE_READ_PIXELS_DISABLE_LEGACY_API
229 return this->
readPixels(dContext, pmap, srcX, srcY, chint);
285 if (!this->
readPixels(dContext, pm, 0, 0, chint)) {
298 if (
auto result =
as_IB(
this)->onMakeWithMipmaps(std::move(mips))) {
306 return this->withMipmaps(
nullptr);
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
SkColorSpace * sk_srgb_singleton()
static bool SkColorTypeIsAlphaOnly(SkColorType ct)
static bool SkImageInfoIsValid(const SkImageInfo &info)
static SkImage_Base * as_IB(SkImage *image)
sk_sp< T > sk_ref_sp(T *obj)
bool peekPixels(SkPixmap *pixmap) const
static bool Equals(const SkColorSpace *, const SkColorSpace *)
static sk_sp< SkData > MakeUninitialized(size_t length)
static sk_sp< SkShader > Make(sk_sp< SkImage >, SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &, const SkMatrix *localMatrix, bool clampAsIfUnpremul=false)
static sk_sp< SkShader > MakeRaw(sk_sp< SkImage >, SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &, const SkMatrix *localMatrix)
virtual bool onAsLegacyBitmap(GrDirectContext *, SkBitmap *) const
virtual GrDirectContext * directContext() const
virtual sk_sp< SkImage > onReinterpretColorSpace(sk_sp< SkColorSpace >) const =0
virtual bool onReadPixels(GrDirectContext *, const SkImageInfo &dstInfo, void *dstPixels, size_t dstRowBytes, int srcX, int srcY, CachingHint) const =0
virtual bool onIsProtected() const =0
virtual bool onHasMipmaps() const =0
virtual bool onPeekPixels(SkPixmap *) const
virtual void onAsyncRescaleAndReadPixelsYUV420(SkYUVColorSpace, bool readAlpha, sk_sp< SkColorSpace > dstColorSpace, SkIRect srcRect, SkISize dstSize, RescaleGamma, RescaleMode, ReadPixelsCallback, ReadPixelsContext) const
virtual void onAsyncRescaleAndReadPixels(const SkImageInfo &, SkIRect srcRect, RescaleGamma, RescaleMode, ReadPixelsCallback, ReadPixelsContext) const
sk_sp< SkImage > makeRasterImage(GrDirectContext *, CachingHint cachingHint=kDisallow_CachingHint) const
SkColorSpace * colorSpace() const
void asyncRescaleAndReadPixelsYUV420(SkYUVColorSpace yuvColorSpace, sk_sp< SkColorSpace > dstColorSpace, const SkIRect &srcRect, const SkISize &dstSize, RescaleGamma rescaleGamma, RescaleMode rescaleMode, ReadPixelsCallback callback, ReadPixelsContext context) const
void asyncRescaleAndReadPixelsYUVA420(SkYUVColorSpace yuvColorSpace, sk_sp< SkColorSpace > dstColorSpace, const SkIRect &srcRect, const SkISize &dstSize, RescaleGamma rescaleGamma, RescaleMode rescaleMode, ReadPixelsCallback callback, ReadPixelsContext context) const
bool readPixels(GrDirectContext *context, const SkImageInfo &dstInfo, void *dstPixels, size_t dstRowBytes, int srcX, int srcY, CachingHint cachingHint=kAllow_CachingHint) const
SkAlphaType alphaType() const
sk_sp< SkImage > withDefaultMipmaps() const
bool peekPixels(SkPixmap *pixmap) const
sk_sp< SkShader > makeRawShader(SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &, const SkMatrix *localMatrix=nullptr) const
sk_sp< SkShader > makeShader(SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &, const SkMatrix *localMatrix=nullptr) const
SkColorType colorType() const
sk_sp< SkImage > makeNonTextureImage(GrDirectContext *=nullptr) const
void asyncRescaleAndReadPixels(const SkImageInfo &info, const SkIRect &srcRect, RescaleGamma rescaleGamma, RescaleMode rescaleMode, ReadPixelsCallback callback, ReadPixelsContext context) const
virtual bool isTextureBacked() const =0
sk_sp< SkImage > reinterpretColorSpace(sk_sp< SkColorSpace > newColorSpace) const
@ kDisallow_CachingHint
disallows internally caching decoded and copied pixels
sk_sp< SkData > refEncodedData() const
sk_sp< SkColorSpace > refColorSpace() const
void(ReadPixelsContext, std::unique_ptr< const AsyncReadResult >) ReadPixelsCallback
bool scalePixels(const SkPixmap &dst, const SkSamplingOptions &, CachingHint cachingHint=kAllow_CachingHint) const
bool asLegacyBitmap(SkBitmap *bitmap, LegacyBitmapMode legacyBitmapMode=kRO_LegacyBitmapMode) const
bool validForRootLevel(const SkImageInfo &) const
bool scalePixels(const SkPixmap &dst, const SkSamplingOptions &) const
const SkImageInfo & info() const
void * writable_addr() const
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
SK_API sk_sp< SkImage > RasterFromData(const SkImageInfo &info, sk_sp< SkData > pixels, size_t rowBytes)
SkSamplingOptions sampling
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
constexpr bool contains(std::string_view str, std::string_view needle)
static constexpr SkIRect MakeWH(int32_t w, int32_t h)
constexpr int32_t width() const
constexpr int32_t height() const
static bool ByteSizeOverflowed(size_t byteSize)
sk_sp< SkColorSpace > refColorSpace() const
size_t minRowBytes() const
size_t computeByteSize(size_t rowBytes) const
SkColorSpace * colorSpace() const
SkImageInfo makeColorSpace(sk_sp< SkColorSpace > cs) const
SkAlphaType alphaType() const
SkColorType colorType() const
std::shared_ptr< const fml::Mapping > data