#include <SkStream.h>
Definition at line 218 of file SkStream.h.
◆ ~SkWStream()
SkWStream::~SkWStream |
( |
| ) |
|
|
virtual |
◆ SkWStream()
◆ bytesWritten()
virtual size_t SkWStream::bytesWritten |
( |
| ) |
const |
|
pure virtual |
◆ flush()
void SkWStream::flush |
( |
| ) |
|
|
virtual |
◆ newline()
bool SkWStream::newline |
( |
| ) |
|
|
inline |
Definition at line 252 of file SkStream.h.
252{
return this->
write(
"\n", std::strlen(
"\n")); }
virtual bool write(const void *buffer, size_t size)=0
◆ SizeOfPackedUInt()
int SkWStream::SizeOfPackedUInt |
( |
size_t |
value | ) |
|
|
static |
This returns the number of bytes in the stream required to store 'value'.
Definition at line 113 of file SkStream.cpp.
113 {
115 return 1;
116 }
else if (
value <= 0xFFFF) {
117 return 3;
118 }
119 return 5;
120}
#define SK_MAX_BYTE_FOR_U8
◆ write()
virtual bool SkWStream::write |
( |
const void * |
buffer, |
|
|
size_t |
size |
|
) |
| |
|
pure virtual |
◆ write16()
bool SkWStream::write16 |
( |
U16CPU |
value | ) |
|
|
inline |
Definition at line 239 of file SkStream.h.
239 {
241 return this->
write(&v, 2);
242 }
constexpr uint16_t SkToU16(S x)
◆ write32()
bool SkWStream::write32 |
( |
uint32_t |
v | ) |
|
|
inline |
◆ write8()
bool SkWStream::write8 |
( |
U8CPU |
value | ) |
|
|
inline |
Definition at line 235 of file SkStream.h.
235 {
237 return this->
write(&v, 1);
238 }
constexpr uint8_t SkToU8(S x)
◆ writeBigDecAsText()
bool SkWStream::writeBigDecAsText |
( |
int64_t |
dec, |
|
|
int |
minDigits = 0 |
|
) |
| |
Definition at line 88 of file SkStream.cpp.
89{
93}
char * SkStrAppendU64(char buffer[], uint64_t, int minDigits)
static constexpr int kSkStrAppendU64_MaxSize
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
◆ writeBool()
bool SkWStream::writeBool |
( |
bool |
v | ) |
|
|
inline |
◆ writeDecAsText()
bool SkWStream::writeDecAsText |
( |
int32_t |
dec | ) |
|
Definition at line 81 of file SkStream.cpp.
82{
86}
static constexpr int kSkStrAppendS32_MaxSize
char * SkStrAppendS32(char buffer[], int32_t)
◆ writeHexAsText()
bool SkWStream::writeHexAsText |
( |
uint32_t |
hex, |
|
|
int |
minDigits = 0 |
|
) |
| |
Definition at line 95 of file SkStream.cpp.
96{
100}
void appendHex(uint32_t value, int minDigits=0)
const char * c_str() const
◆ writePackedUInt()
bool SkWStream::writePackedUInt |
( |
size_t |
value | ) |
|
Definition at line 122 of file SkStream.cpp.
122 {
128 }
else if (
value <= 0xFFFF) {
129 uint16_t value16 =
value;
131 memcpy(&
data[1], &value16, 2);
133 } else {
136 memcpy(&
data[1], &value32, 4);
138 }
140}
#define SK_BYTE_SENTINEL_FOR_U16
#define SK_BYTE_SENTINEL_FOR_U32
constexpr uint32_t SkToU32(S x)
std::shared_ptr< const fml::Mapping > data
◆ writeScalar()
bool SkWStream::writeScalar |
( |
SkScalar |
value | ) |
|
◆ writeScalarAsText()
bool SkWStream::writeScalarAsText |
( |
SkScalar |
value | ) |
|
Definition at line 102 of file SkStream.cpp.
103{
107}
char * SkStrAppendScalar(char buffer[], SkScalar)
static constexpr int kSkStrAppendScalar_MaxSize
◆ writeStream()
bool SkWStream::writeStream |
( |
SkStream * |
input, |
|
|
size_t |
length |
|
) |
| |
Definition at line 142 of file SkStream.cpp.
142 {
143 char scratch[1024];
144 const size_t MAX =
sizeof(scratch);
145
150 }
152 if (!this->
write(scratch, n)) {
153 return false;
154 }
156 }
157 return true;
158}
◆ writeText()
bool SkWStream::writeText |
( |
const char |
text[] | ) |
|
|
inline |
The documentation for this class was generated from the following files: