19 std::shared_ptr<const fml::Mapping> allocation) {
24 return std::make_shared<CompressedImageSkia>(std::move(allocation));
28 std::shared_ptr<const fml::Mapping> allocation)
42 auto src =
new std::shared_ptr<const fml::Mapping>(
source_);
45 [](
const void* ptr,
void* context) {
46 delete reinterpret_cast<decltype(src)>(context);
59 auto bitmap = std::make_shared<SkBitmap>();
61 VALIDATION_LOG <<
"Could not allocate arena for decompressing image.";
70 auto mapping = std::make_shared<fml::NonOwnedMapping>(
71 reinterpret_cast<const uint8_t*
>(
bitmap->pixmap().addr()),
79 {
bitmap->pixmap().dimensions().fWidth,
80 bitmap->pixmap().dimensions().fHeight},
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
static sk_sp< SkData > MakeWithProc(const void *ptr, size_t length, ReleaseProc proc, void *ctx)
const SkImageInfo & imageInfo() const
bool readPixels(GrDirectContext *context, const SkImageInfo &dstInfo, void *dstPixels, size_t dstRowBytes, int srcX, int srcY, CachingHint cachingHint=kAllow_CachingHint) const
CompressedImageSkia(std::shared_ptr< const fml::Mapping > allocation)
~CompressedImageSkia() override
static std::shared_ptr< CompressedImage > Create(std::shared_ptr< const fml::Mapping > allocation)
DecompressedImage Decode() const override
const std::shared_ptr< const fml::Mapping > source_
SK_API sk_sp< SkImage > DeferredFromEncodedData(sk_sp< SkData > encoded, std::optional< SkAlphaType > alphaType=std::nullopt)
sk_sp< const SkImage > image
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
SkISize dimensions() const
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)
std::shared_ptr< const fml::Mapping > data