Definition at line 351 of file SkRawCodec.cpp.
◆ SkRawAssetStream()
SkRawAssetStream::SkRawAssetStream |
( |
std::unique_ptr< SkStream > |
stream | ) |
|
|
inlineexplicit |
◆ ~SkRawAssetStream()
SkRawAssetStream::~SkRawAssetStream |
( |
| ) |
|
|
inlineoverride |
◆ getLength()
uint64 SkRawAssetStream::getLength |
( |
| ) |
|
|
inlineoverridevirtual |
◆ read()
bool SkRawAssetStream::read |
( |
void * |
data, |
|
|
size_t |
offset, |
|
|
size_t |
length |
|
) |
| |
|
inlineoverridevirtual |
Implements SkRawStream.
Definition at line 367 of file SkRawCodec.cpp.
367 {
369 return true;
370 }
371
372 size_t sum;
374 return false;
375 }
376
378 }
std::shared_ptr< const fml::Mapping > data
◆ transferBuffer()
std::unique_ptr< SkMemoryStream > SkRawAssetStream::transferBuffer |
( |
size_t |
offset, |
|
|
size_t |
size |
|
) |
| |
|
inlineoverridevirtual |
Implements SkRawStream.
Definition at line 380 of file SkRawCodec.cpp.
380 {
381 if (fStream->getLength() <
offset) {
382 return nullptr;
383 }
384
385 size_t sum;
386 if (!safe_add_to_size_t(
offset,
size, &sum)) {
387 return nullptr;
388 }
389
390
391
392 const size_t bytesToRead =
std::min(sum, fStream->getLength()) -
offset;
393 if (bytesToRead == 0) {
394 return nullptr;
395 }
396
397 if (fStream->getMemoryBase()) {
399 static_cast<const uint8_t*
>(fStream->getMemoryBase()) +
offset, bytesToRead));
400 fStream.reset();
402 } else {
404 if (!fStream->seek(
offset)) {
405 return nullptr;
406 }
407 const size_t bytesRead = fStream->read(
data->writable_data(), bytesToRead);
408 if (bytesRead < bytesToRead) {
410 }
412 }
413 }
static sk_sp< SkData > MakeUninitialized(size_t length)
static sk_sp< SkData > MakeWithCopy(const void *data, 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)
static float min(float r, float g, float b)
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
The documentation for this class was generated from the following file: