24 if (
size > 0 && SkTFitsIn<int32_t>(
size)) {
65 dst.image() =
nullptr;
69 size_t dstW = safe.
add(
src.fBounds.width(), safe.
add(radiusX, radiusX));
71 size_t dstH = safe.
add(
src.fBounds.height(), safe.
add(radiusY, radiusY));
73 size_t toAlloc = safe.
mul(dstW, dstH);
76 if (!SkTFitsIn<int>(dstW) || !SkTFitsIn<int>(dstH) || toAlloc > INT_MAX || !safe) {
77 dst.bounds().setEmpty();
82 dst.bounds().setWH(SkTo<int>(dstW), SkTo<int>(dstH));
83 dst.bounds().offset(
src.fBounds.x(),
src.fBounds.y());
84 dst.bounds().offset(-radiusX, -radiusY);
85 dst.rowBytes() = SkTo<uint32_t>(dstW);
87 if (
src.fImage !=
nullptr) {
SK_API void * sk_malloc_flags(size_t size, unsigned flags)
@ SK_MALLOC_ZERO_INITIALIZE
SK_API void sk_free(void *)
static int maskFormatToShift(SkMask::Format format)
static int32_t safeMul32(int32_t a, int32_t b)
static const int gMaskFormatToShift[]
static int64_t sk_64_mul(int64_t a, int64_t b)
constexpr int32_t SkToS32(S x)
size_t add(size_t x, size_t y)
static size_t Align4(size_t x)
size_t mul(size_t x, size_t y)
FlutterSemanticsFlag flags
uint32_t uint32_t * format
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
constexpr int32_t height() const
int32_t fTop
smaller y-axis bounds
int32_t fLeft
smaller x-axis bounds
bool contains(int32_t x, int32_t y) const
static void FreeImage(void *image)
static SkMaskBuilder PrepareDestination(int radiusX, int radiusY, const SkMask &src)
static uint8_t * AllocImage(size_t bytes, AllocType=kUninit_Alloc)
@ k3D_Format
3 8bit per pixl planes: alpha, mul, add
@ kA8_Format
8bits per pixel mask (e.g. antialiasing)
@ kBW_Format
1bit per pixel mask (e.g. monochrome)
const void * getAddr(int x, int y) const
uint8_t const *const fImage
size_t computeTotalImageSize() const
size_t computeImageSize() const