Skia
2DGraphicsLibrary
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SkDynamicMemoryWStream Class Reference
Inheritance diagram for SkDynamicMemoryWStream:
SkWStream

Public Member Functions

bool write (const void *buffer, size_t size) override
 Called to write bytes to a SkWStream. More...
 
size_t bytesWritten () const override
 
bool write (const void *buffer, size_t offset, size_t size)
 
bool read (void *buffer, size_t offset, size_t size)
 
size_t getOffset () const
 
void copyTo (void *dst) const
 
void writeToStream (SkWStream *dst) const
 
SkDatacopyToData () const
 Return a copy of the data written so far. More...
 
SkStreamAssetdetachAsStream ()
 Reset, returning a reader stream with the current content. More...
 
void reset ()
 Reset the stream to its original, empty, state. More...
 
void padToAlign4 ()
 
- Public Member Functions inherited from SkWStream
virtual void newline ()
 
virtual void flush ()
 
bool write8 (U8CPU)
 
bool write16 (U16CPU)
 
bool write32 (uint32_t)
 
bool writeText (const char text[])
 
bool writeDecAsText (int32_t)
 
bool writeBigDecAsText (int64_t, int minDigits=0)
 
bool writeHexAsText (uint32_t, int minDigits=0)
 
bool writeScalarAsText (SkScalar)
 
bool writeBool (bool v)
 
bool writeScalar (SkScalar)
 
bool writePackedUInt (size_t)
 
bool writeStream (SkStream *input, size_t length)
 

Private Types

typedef SkWStream INHERITED
 

Private Member Functions

void invalidateCopy ()
 

Private Attributes

Block * fHead
 
Block * fTail
 
size_t fBytesWritten
 
sk_sp< SkDatafCopy
 

Friends

class SkBlockMemoryStream
 
class SkBlockMemoryRefCnt
 

Additional Inherited Members

- Static Public Member Functions inherited from SkWStream
static int SizeOfPackedUInt (size_t value)
 This returns the number of bytes in the stream required to store 'value'.
 

Member Function Documentation

SkData* SkDynamicMemoryWStream::copyToData ( ) const

Return a copy of the data written so far.

This call is responsible for calling unref() when they are finished with the data.

SkStreamAsset* SkDynamicMemoryWStream::detachAsStream ( )

Reset, returning a reader stream with the current content.

void SkDynamicMemoryWStream::reset ( )

Reset the stream to its original, empty, state.

bool SkDynamicMemoryWStream::write ( const void *  buffer,
size_t  size 
)
overridevirtual

Called to write bytes to a SkWStream.

Returns true on success

Parameters
bufferthe address of at least size bytes to be written to the stream
sizeThe number of bytes in buffer to write to the stream
Returns
true on success

Implements SkWStream.


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