28 const void* expected,
size_t size) {
50 const int32_t expected[] = { 0x0, 0x0 };
56 int32_t array[3] = { 1, 2, 4 };
74 for (
int i = 0;
i < 100; ++
i) {
78 for (
int j = 100*4; j >= 0; j -= 16) {
85 const uint32_t
data[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
100 const size_t dataSize = 10;
105 for (
size_t i = 0;
i < dataSize;
i++) {
111 for (
size_t len = 0;
len < dataSize;
len++) {
123 for (
size_t len = 0;
len < dataSize;
len++) {
124 const char* readPtr =
static_cast<const char*
>(reader.
skip(
len));
130 while (readPtr < stop) {
137 const size_t padding = 64;
139 const uint32_t uint1 = 0x12345678;
140 const uint32_t
uint2 = 0x98765432;
141 const SkScalar scalar1 = 1234.5678f;
142 const SkScalar scalar2 = 9876.5432f;
146 for (
size_t i = 0;
i < (padding / 4); ++
i) {
154 for (
size_t i = 0;
i < (padding / 4); ++
i) {
161 padding +
sizeof(uint32_t) +
sizeof(
SkRect)) == scalar1);
164 writer->
overwriteTAt(padding +
sizeof(uint32_t), rect2);
170 padding +
sizeof(uint32_t) +
sizeof(
SkRect)) == scalar2);
213 const char* str =
"0123456789";
217 const size_t sizes[] = {
224 size_t sizeWritten = 0;
227 sizeWritten += sizes[0];
231 sizeWritten += sizes[1];
235 sizeWritten += sizes[2];
static constexpr T SkAlign4(T x)
#define REPORTER_ASSERT(r, cond,...)
static void check_contents(skiatest::Reporter *reporter, const SkWriter32 &writer, const void *expected, size_t size)
static void test_rewind(skiatest::Reporter *reporter)
static void test_reserve(skiatest::Reporter *reporter)
static void test1(skiatest::Reporter *reporter, SkWriter32 *writer)
DEF_TEST(Writer32_dynamic, reporter)
static void testOverwriteT(skiatest::Reporter *reporter, SkWriter32 *writer)
static void test_string_null(skiatest::Reporter *reporter)
static void testWritePad(skiatest::Reporter *reporter, SkWriter32 *writer)
static sk_sp< SkData > MakeWithCString(const char cstr[])
static sk_sp< SkData > MakeEmpty()
const void * skip(size_t size)
sk_sp< SkData > readByteArrayAsData()
void overwriteTAt(size_t offset, const T &value)
void writeInt(int32_t value)
static size_t WriteDataSize(const SkData *data)
void write32(int32_t value)
void writeRect(const SkRect &rect)
void writeScalar(SkScalar value)
uint32_t * reserve(size_t size)
void writePad(const void *src, size_t size)
void writeData(const SkData *data)
void reset(void *external=nullptr, size_t externalBytes=0)
const T & readTAt(size_t offset) const
void flatten(void *dst) const
void rewindToOffset(size_t offset)
sk_sp< SkData > snapshotAsData() const
void writeString(const char *str, size_t len=(size_t) -1)
size_t bytesWritten() 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 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
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
std::shared_ptr< const fml::Mapping > data