27#if !defined(SK_DISABLE_LEGACY_PNG_WRITEBUFFER)
46 :
SkWriteBuffer(
p), fFactorySet(nullptr), fTFSet(nullptr), fWriter(storage, storageSize) {}
176#if !defined(SK_DISABLE_LEGACY_PNG_WRITEBUFFER)
179 if (!ib->getROPixels(ib->directContext(), &bm)) {
184 return stream.detachAsData();
207 buffer.writeDataAsByteArray(levelData.
get());
212 return buffer.snapshotAsData();
249 if (obj ==
nullptr) {
255 if (!SkTFitsIn<int32_t>(
size)) {
267 fWriter.
write32(fTFSet ? fTFSet->
add(obj) : 0);
275 fFactorySet = std::move(rec);
279 fTFSet = std::move(rec);
283 if (
nullptr == flattenable) {
307 if (uint32_t* indexPtr = fFlattenableDict.
find(
name)) {
318 fFlattenableDict.
set(
name, fFlattenableDict.
count() + 1);
323 (void)fWriter.
reserve(
sizeof(uint32_t));
static SkImage_Base * as_IB(SkImage *image)
constexpr int32_t SkToS32(S x)
constexpr uint32_t SkToU32(S x)
static sk_sp< SkData > serialize_image(const SkImage *image, SkSerialProcs procs)
static sk_sp< SkData > serialize_mipmap(const SkMipmap *mipmap, SkSerialProcs procs)
void writeBool(bool value) override
void writeByteArray(const void *data, size_t size) override
void writeFlattenable(const SkFlattenable *flattenable) override
void writeColor(SkColor color) override
void writeIntArray(const int32_t *value, uint32_t count) override
void writePoint(const SkPoint &point) override
void writeColor4f(const SkColor4f &color) override
void writeIRect(const SkIRect &rect) override
size_t writeStream(SkStream *stream, size_t length) override
void writeColorArray(const SkColor *color, uint32_t count) override
void writeTypeface(SkTypeface *typeface) override
void writeScalar(SkScalar value) override
void writeScalarArray(const SkScalar *value, uint32_t count) override
size_t bytesWritten() const
void writePointArray(const SkPoint *point, uint32_t count) override
bool writeToStream(SkWStream *) const
void writeString(std::string_view value) override
void writePoint3(const SkPoint3 &point) override
void writePath(const SkPath &path) override
void writeColor4fArray(const SkColor4f *color, uint32_t count) override
SkBinaryWriteBuffer(const SkSerialProcs &)
void writePaint(const SkPaint &paint) override
void writeUInt(uint32_t value) override
void setTypefaceRecorder(sk_sp< SkRefCntSet >)
void setFactoryRecorder(sk_sp< SkFactorySet >)
~SkBinaryWriteBuffer() override
void writeRect(const SkRect &rect) override
void writeMatrix(const SkMatrix &matrix) override
void writeInt(int32_t value) override
void writeSampling(const SkSamplingOptions &) override
bool usingInitialStorage() const
void writeImage(const SkImage *) override
void writeRegion(const SkRegion ®ion) override
void write(const void *buffer, size_t bytes)
void writePad32(const void *buffer, size_t bytes) override
const SkPixmap & pixmap() const
virtual void flatten(SkWriteBuffer &) const
sk_sp< SkFlattenable >(* Factory)(SkReadBuffer &)
virtual const char * getTypeName() const =0
virtual Factory getFactory() const =0
virtual SkMipmap * onPeekMips() const
SkAlphaType alphaType() const
sk_sp< SkData > refEncodedData() const
static const SkScalar * M44ColMajor(const SkM44 &m)
bool getLevel(int index, Level *) const
static void Flatten(const SkPaint &paint, SkWriteBuffer &buffer)
void writeDataAsByteArray(const SkData *data)
void write32(int32_t value)
void overwriteTAt(size_t offset, const T &value)
void write32(int32_t value)
void write(const void *values, size_t size)
bool usingInitialStorage() const
void writeSampling(const SkSamplingOptions &sampling)
uint32_t * reservePad(size_t size)
void writeRect(const SkRect &rect)
void writeScalar(SkScalar value)
size_t readFromStream(SkStream *stream, size_t length)
void writeMatrix(const SkMatrix &matrix)
uint32_t * reserve(size_t size)
void writePad(const void *src, size_t size)
void writePath(const SkPath &path)
bool writeToStream(SkWStream *stream) const
bool writeBool(bool value)
void writeRegion(const SkRegion &rgn)
void writeString(const char *str, size_t len=(size_t) -1)
size_t bytesWritten() const
V * find(const K &key) const
FlutterSemanticsFlag flags
SK_API sk_sp< SkImage > RasterFromPixmap(const SkPixmap &pixmap, RasterReleaseProc rasterReleaseProc, ReleaseContext releaseContext)
SK_API bool Encode(SkWStream *dst, const SkPixmap &src, const Options &options)
unsigned useCenter Optional< SkMatrix > matrix
sk_sp< const SkImage > image
ClipOpAndAA opAA SkRegion region
sk_sp< SkBlender > blender SkRect rect
SkSamplingOptions sampling
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
DEF_SWITCHES_START aot vmservice shared library name
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
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
SkSerialImageProc fImageProc
SkSerialTypefaceProc fTypefaceProc
std::shared_ptr< const fml::Mapping > data