276 {
279
281 if (fStream->skip(skipLength) != skipLength) {
282 return nullptr;
283 }
284 const size_t bytesRead = fStream->read(
data->writable_data(), size);
285 if (bytesRead < size) {
287 }
288 } else {
290 if (alreadyBuffered > 0 &&
291 !fStreamBuffer.
read(
data->writable_data(),
offset, alreadyBuffered)) {
292 return nullptr;
293 }
294
295 const size_t remaining =
size - alreadyBuffered;
296 if (remaining) {
297 auto*
dst =
static_cast<uint8_t*
>(
data->writable_data()) + alreadyBuffered;
298 const size_t bytesRead = fStream->read(dst, remaining);
299 size_t newSize;
300 if (bytesRead < remaining) {
301 if (!safe_add_to_size_t(alreadyBuffered, bytesRead, &newSize)) {
302 return nullptr;
303 }
305 }
306 }
307 }
309 }
static sk_sp< SkData > MakeUninitialized(size_t length)
static sk_sp< SkData > MakeSubset(const SkData *src, size_t offset, size_t length)
static std::unique_ptr< SkMemoryStream > Make(sk_sp< SkData > data)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot data
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