#include <SkPictureData.h>
Definition at line 87 of file SkPictureData.h.
◆ SkPictureData() [1/2]
Definition at line 50 of file SkPictureData.cpp.
59
61
62 fPaints = record.fPaints;
63
66
67
69 });
70
71 this->initForPlayback();
72}
const SkPictInfo & info() const
const skia_private::TArray< sk_sp< const SkPicture > > & getPictures() const
const skia_private::TArray< sk_sp< const SkTextBlob > > & getTextBlobs() const
const skia_private::TArray< sk_sp< const SkImage > > & getImages() const
const skia_private::TArray< sk_sp< const SkVertices > > & getVertices() const
sk_sp< SkData > opData() const
const skia_private::TArray< sk_sp< SkDrawable > > & getDrawables() const
const skia_private::TArray< sk_sp< const sktext::gpu::Slug > > & getSlugs() const
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
◆ SkPictureData() [2/2]
SkPictureData::SkPictureData |
( |
const SkPictInfo & |
info | ) |
|
|
explicitprotected |
◆ CreateFromBuffer()
Definition at line 534 of file SkPictureData.cpp.
535 {
538
540 return nullptr;
541 }
542 return data.release();
543}
SkPictureData(const SkPictureRecord &record, const SkPictInfo &)
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
uint32_t getVersion() const
std::shared_ptr< const fml::Mapping > data
◆ CreateFromStream()
Definition at line 518 of file SkPictureData.cpp.
522 {
524 if (!topLevelTFPlayback) {
525 topLevelTFPlayback = &
data->fTFPlayback;
526 }
527
528 if (!
data->parseStream(
stream, procs, topLevelTFPlayback, recursionLimit)) {
529 return nullptr;
530 }
531 return data.release();
532}
◆ flatten()
Definition at line 281 of file SkPictureData.cpp.
281 {
284
285 if (!fPictures.
empty()) {
287 for (const auto& pic : fPictures) {
289 }
290 }
291
292 if (!fDrawables.
empty()) {
294 for (
const auto&
draw : fDrawables) {
296 }
297 }
298
299
300 this->flattenToBuffer(
buffer,
false);
302}
static void write_tag_size(SkWriteBuffer &buffer, uint32_t tag, size_t size)
#define SK_PICT_PICTURE_TAG
#define SK_PICT_DRAWABLE_TAG
#define SK_PICT_READER_TAG
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
const uint8_t * bytes() const
static void Flatten(const sk_sp< const SkPicture >, SkWriteBuffer &buffer)
◆ getDrawable()
Definition at line 130 of file SkPictureData.h.
130 {
132 }
T * read_index_base_1_or_null(SkReadBuffer *reader, const skia_private::TArray< sk_sp< T > > &array)
◆ getImage()
Definition at line 114 of file SkPictureData.h.
114 {
115
116 const int index = reader->
readInt();
117 return reader->
validateIndex(index, fImages.
size()) ? fImages[index].get() :
nullptr;
118 }
bool validateIndex(int index, int count)
◆ getPath()
Definition at line 120 of file SkPictureData.h.
120 {
122 return reader->
validate(index > 0 && index <= fPaths.
size()) ?
123 fPaths[index - 1] : fEmptyPath;
124 }
bool validate(bool isValid)
◆ getPicture()
◆ getSlug()
◆ getTextBlob()
◆ getVertices()
◆ info()
◆ opData()
const sk_sp< SkData > & SkPictureData::opData |
( |
| ) |
const |
|
inline |
◆ optionalPaint()
Definition at line 583 of file SkPictureData.cpp.
583 {
585 if (index == 0) {
586 return nullptr;
587 }
588 return reader->
validate(index > 0 && index <= fPaints.
size()) ?
589 &fPaints[index - 1] : nullptr;
590}
◆ parseBuffer()
Definition at line 565 of file SkPictureData.cpp.
565 {
566 while (
buffer.isValid()) {
567 uint32_t tag =
buffer.readUInt();
569 break;
570 }
572 }
573
574
575 if (!
buffer.validate(this->opData() !=
nullptr)) {
576
577
578 return false;
579 }
580 return true;
581}
◆ parseStream()
Definition at line 545 of file SkPictureData.cpp.
548 {
549 for (;;) {
550 uint32_t tag;
551 if (!
stream->readU32(&tag)) {
return false; }
553 break;
554 }
555
557 if (!
stream->readU32(&
size)) {
return false; }
558 if (!this->parseStreamTag(
stream, tag,
size, procs, topLevelTFPlayback, recursionLimit)) {
559 return false;
560 }
561 }
562 return true;
563}
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
◆ requiredPaint()
Definition at line 592 of file SkPictureData.cpp.
592 {
596 }
598 return stub;
599}
const SkPaint * optionalPaint(SkReadBuffer *reader) const
◆ serialize()
Definition at line 227 of file SkPictureData.cpp.
228 {
229
232
233
235 SkRefCntSet* typefaceSet = topLevelTypeFaceSet ? topLevelTypeFaceSet : &localTypefaceSet;
236
237
238
243 this->flattenToBuffer(
buffer, textBlobsOnly);
244
245
246
248 DevNull() : fBytesWritten(0) {}
249 size_t fBytesWritten;
250 bool write(
const void*,
size_t size)
override { fBytesWritten +=
size;
return true; }
251 size_t bytesWritten() const override { return fBytesWritten; }
252 } devnull;
253 for (const auto& pic : fPictures) {
254 pic->serialize(&devnull, nullptr, typefaceSet, true);
255 }
256 if (textBlobsOnly) { return; }
257
258
259
260 WriteFactories(
stream, factSet);
261
262
263
264 WriteTypefaces(
stream, *typefaceSet, procs);
265
266
269
270
271 if (!fPictures.empty()) {
273 for (const auto& pic : fPictures) {
274 pic->serialize(
stream, &procs, typefaceSet,
false);
275 }
276 }
277
279}
static SkSerialProcs skip_typeface_proc(const SkSerialProcs &procs)
#define SK_PICT_BUFFER_SIZE_TAG
sk_sp< T > sk_ref_sp(T *obj)
void write(SkWStream *wStream, const T &text)
The documentation for this class was generated from the following files: