20#include <initializer_list>
28class UnowningStream :
public SkStream {
34 size_t read(
void* buf,
size_t bytes)
override {
35 return fStream->read(buf, bytes);
39 return fStream->rewind();
43 return fStream->isAtEnd();
54 for (
const char*
path : {
"images/plane.png",
55 "images/yellow_rose.png",
56 "images/plane_interlaced.png",
57 "images/mandrill.wbmp",
58 "images/randPixels.bmp",
65 const int kNumImages = 2;
69 for (
int i = 0;
i < kNumImages;
i++) {
75 for (
int i = 0;
i < kNumImages; ++
i) {
77 std::make_unique<UnowningStream>(&
stream)));
79 ERRORF(r,
"Failed to create a codec from %s, iteration %i",
path,
i);
83 auto info = codec->getInfo().makeColorType(kN32_SkColorType);
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
sk_sp< SkData > GetResourceAsData(const char *resource)
void allocPixels(const SkImageInfo &info, size_t rowBytes)
const SkImageInfo & info() const
static std::unique_ptr< SkCodec > MakeFromStream(std::unique_ptr< SkStream >, SkSpan< const SkCodecs::Decoder > decoders, Result *=nullptr, SkPngChunkReader *=nullptr, SelectionPolicy selectionPolicy=SelectionPolicy::kPreferStillImage)
static sk_sp< SkData > MakeUninitialized(size_t length)
virtual bool isAtEnd() const =0
virtual size_t read(void *buffer, size_t size)=0
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
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
std::shared_ptr< const fml::Mapping > data