Skia
2DGraphicsLibrary
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SkRWBuffer Class Reference

Accumulates bytes of memory that are "appended" to it, growing internal storage as needed. More...

#include <SkRWBuffer.h>

Public Member Functions

 SkRWBuffer (size_t initialCapacity=0)
 
size_t size () const
 
void append (const void *buffer, size_t length)
 
SkROBuffernewRBufferSnapshot () const
 
SkStreamAssetnewStreamSnapshot () const
 
void validate () const
 

Private Attributes

SkBufferHead * fHead
 
SkBufferBlock * fTail
 
size_t fTotalUsed
 

Detailed Description

Accumulates bytes of memory that are "appended" to it, growing internal storage as needed.

The growth is done such that at any time in the writer's thread, an RBuffer or StreamAsset can be snapped off (and safely passed to another thread). The RBuffer/StreamAsset snapshot can see the previously stored bytes, but will be unaware of any future writes.


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