38 if (!
b.setInfo(
info, rowBytes)) {
42 if (
info.width() <= 0 ||
info.height() <= 0) {
45 if (
info.width() > maxDimension ||
info.height() > maxDimension) {
58 if (!
info.validRowBytes(rowBytes)) {
62 size_t size =
info.computeByteSize(rowBytes);
97 return sk_make_sp<SkImage_Raster>(
info, std::move(
data), rowBytes);
106 if (!
src || !filter) {
127 if (!
data ||
data->size() < expectedSize) {
141 if (!
bitmap.tryAllocPixels(ii)) {
160 return sk_make_sp<SkImage_Raster>(pmap.
info(), std::move(
data), pmap.
rowBytes());
173 return sk_make_sp<SkImage_Raster>(pmap.
info(), std::move(
data), pmap.
rowBytes(),
id);
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
@ kOpaque_SkAlphaType
pixel is opaque
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
@ kLastEnum_SkAlphaType
last valid value
@ kLastEnum_SkColorType
last valid value
@ kUnknown_SkColorType
uninitialized
bool SkDecompress(sk_sp< SkData > data, SkISize dimensions, SkTextureCompressionType compressionType, SkBitmap *dst)
size_t SkCompressedFormatDataSize(SkTextureCompressionType compressionType, SkISize dimensions, bool mipmapped)
static constexpr bool SkTextureCompressionTypeIsOpaque(SkTextureCompressionType compression)
static SkImageFilter_Base * as_IFB(SkImageFilter *filter)
SK_SPI sk_sp< SkImage > SkMakeImageFromRasterBitmap(const SkBitmap &, SkCopyPixelsMode)
@ kIfMutable_SkCopyPixelsMode
only copy src pixels if they are marked mutable
sk_sp< SkImage > MakeRasterCopyPriv(const SkPixmap &pmap, uint32_t id)
static bool valid_args(const SkImageInfo &info, size_t rowBytes, size_t *minSize)
static constexpr int32_t SK_MaxS32
SkPixelRef * pixelRef() const
static sk_sp< SkData > MakeWithProc(const void *ptr, size_t length, ReleaseProc proc, void *ctx)
static sk_sp< SkData > MakeWithCopy(const void *data, size_t length)
sk_sp< SkImage > makeImageWithFilter(sk_sp< skif::Backend > backend, sk_sp< SkImage > src, const SkIRect &subset, const SkIRect &clipBounds, SkIRect *outSubset, SkIPoint *offset) const
const SkImageInfo & info() const
const void * addr() const
SK_API sk_sp< SkImage > RasterFromData(const SkImageInfo &info, sk_sp< SkData > pixels, size_t rowBytes)
SK_API sk_sp< SkImage > RasterFromPixmap(const SkPixmap &pixmap, RasterReleaseProc rasterReleaseProc, ReleaseContext releaseContext)
SK_API sk_sp< SkImage > RasterFromBitmap(const SkBitmap &bitmap)
SK_API sk_sp< SkImage > RasterFromPixmapCopy(const SkPixmap &pixmap)
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
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
sk_sp< Backend > MakeRasterBackend(const SkSurfaceProps &surfaceProps, SkColorType colorType)
static bool ByteSizeOverflowed(size_t byteSize)
size_t minRowBytes() const
static SkImageInfo MakeN32(int width, int height, SkAlphaType at)
std::shared_ptr< const fml::Mapping > data