42 surf->getCanvas()->drawPicture(pic);
43 return surf->makeImageSnapshot();
53 const char magic_str[] =
"magic signature";
175 for (
int i = 0;
i < 20; ++
i) {
217 if (!tf0 || !tf1 || tf0.get() == tf1.get()) {
230 auto data = pic->serialize(&procs);
static sk_sp< SkData > array_serial_proc(SkPicture *pic, void *ctx)
static sk_sp< SkPicture > make_pic(const std::function< void(SkCanvas *)> &drawer)
static sk_sp< SkPicture > array_deserial_proc(const void *data, size_t size, void *ctx)
static void test_pictures(skiatest::Reporter *reporter, sk_sp< SkPicture > p0, int count, bool skipRoot)
static SkSerialProcs makes(SkSerialPictureProc proc, void *ctx=nullptr)
static sk_sp< SkImage > picture_to_image(const sk_sp< SkPicture > &pic)
static sk_sp< SkPicture > make_picture(const sk_sp< SkTypeface > &tf0, const sk_sp< SkTypeface > &tf1)
DEF_TEST(serial_procs_image, reporter)
static SkDeserialProcs maked(SkDeserialPictureProc proc, const void *ctx=nullptr)
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
sk_sp< T > sk_ref_sp(T *obj)
#define REPORTER_ASSERT(r, cond,...)
int find(T *array, int N, T item)
void drawColor(SkColor color, SkBlendMode mode=SkBlendMode::kSrcOver)
void drawPaint(const SkPaint &paint)
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
void drawPicture(const SkPicture *picture)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
static sk_sp< SkData > MakeWithCString(const char cstr[])
static sk_sp< SkData > MakeWithCopy(const void *data, size_t length)
SkCanvas * beginRecording(const SkRect &bounds, sk_sp< SkBBoxHierarchy > bbh)
sk_sp< SkPicture > finishRecordingAsPicture()
sk_sp< SkData > serialize(const SkSerialProcs *procs=nullptr) const
virtual SkRect cullRect() const =0
static sk_sp< SkPicture > MakeFromData(const SkData *data, const SkDeserialProcs *procs=nullptr)
void removeShuffle(int index)
Dart_NativeFunction function
SK_API sk_sp< SkImage > DeferredFromEncodedData(sk_sp< SkData > encoded, std::optional< SkAlphaType > alphaType=std::nullopt)
SK_API bool Encode(SkWStream *dst, const SkPixmap &src, const Options &options)
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
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
font
Font Metadata and Metrics.
SkTDArray< SkPicture * > fArray
SkDeserialPictureProc fPictureProc
SkDeserialImageProc fImageProc
constexpr int32_t height() const
constexpr int32_t width() const
static SkImageInfo MakeN32Premul(int width, int height)
void round(SkIRect *dst) const
SkSerialImageProc fImageProc
SkSerialTypefaceProc fTypefaceProc
SkSerialPictureProc fPictureProc
std::shared_ptr< const fml::Mapping > data