Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
SkSL::OutputStream Class Referenceabstract

#include <SkSLOutputStream.h>

Inheritance diagram for SkSL::OutputStream:
SkSL::FileOutputStream SkSL::StringStream

Public Member Functions

virtual bool isValid () const
 
virtual void write8 (uint8_t b)=0
 
void write16 (uint16_t i)
 
void write32 (uint32_t i)
 
virtual void writeText (const char *s)=0
 
virtual void write (const void *s, size_t size)=0
 
void writeString (const std::string &s)
 
void printf (const char format[],...) SK_PRINTF_LIKE(2
 
void void appendVAList (const char format[], va_list args) SK_PRINTF_LIKE(2
 
void void virtual ~OutputStream ()
 

Detailed Description

Definition at line 20 of file SkSLOutputStream.h.

Constructor & Destructor Documentation

◆ ~OutputStream()

void void virtual SkSL::OutputStream::~OutputStream ( )
inlinevirtual

Definition at line 50 of file SkSLOutputStream.h.

50{}

Member Function Documentation

◆ appendVAList()

void SkSL::OutputStream::appendVAList ( const char  format[],
va_list  args 
)

Definition at line 26 of file SkSLOutputStream.cpp.

26 {
27 char buffer[kBufferSize];
28 va_list copy;
29 va_copy(copy, args);
30 int length = vsnprintf(buffer, kBufferSize, format, args);
31 if (length > (int) kBufferSize) {
32 std::unique_ptr<char[]> bigBuffer(new char[length + 1]);
33 vsnprintf(bigBuffer.get(), length + 1, format, copy);
34 this->write(bigBuffer.get(), length);
35 } else {
36 this->write(buffer, length);
37 }
38 va_end(copy);
39}
static void copy(void *dst, const uint8_t *src, int width, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
Definition: SkSwizzler.cpp:31
virtual void write(const void *s, size_t size)=0
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
uint32_t uint32_t * format
size_t length
Definition: copy.py:1
va_end(args)
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
Definition: switches.h:126

◆ isValid()

virtual bool SkSL::OutputStream::isValid ( ) const
inlinevirtual

Reimplemented in SkSL::FileOutputStream.

Definition at line 22 of file SkSLOutputStream.h.

22 {
23 return true;
24 }

◆ printf()

void SkSL::OutputStream::printf ( const char  format[],
  ... 
)

Definition at line 19 of file SkSLOutputStream.cpp.

19 {
20 va_list args;
22 this->appendVAList(format, args);
23 va_end(args);
24}
void void appendVAList(const char format[], va_list args) SK_PRINTF_LIKE(2
va_start(args, format)

◆ write()

virtual void SkSL::OutputStream::write ( const void *  s,
size_t  size 
)
pure virtual

◆ write16()

void SkSL::OutputStream::write16 ( uint16_t  i)
inline

Definition at line 28 of file SkSLOutputStream.h.

28 {
29 this->write8((uint8_t) i);
30 this->write8((uint8_t) (i >> 8));
31 }
virtual void write8(uint8_t b)=0

◆ write32()

void SkSL::OutputStream::write32 ( uint32_t  i)
inline

Definition at line 33 of file SkSLOutputStream.h.

33 {
34 this->write8((uint8_t) i);
35 this->write8((uint8_t) (i >> 8));
36 this->write8((uint8_t) (i >> 16));
37 this->write8((uint8_t) (i >> 24));
38 }

◆ write8()

virtual void SkSL::OutputStream::write8 ( uint8_t  b)
pure virtual

◆ writeString()

void SkSL::OutputStream::writeString ( const std::string &  s)

Definition at line 15 of file SkSLOutputStream.cpp.

15 {
16 this->write(s.c_str(), s.size());
17}
struct MyStruct s

◆ writeText()

virtual void SkSL::OutputStream::writeText ( const char *  s)
pure virtual

The documentation for this class was generated from the following files: