Skia
2DGraphicsLibrary
|
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) |
SkROBuffer * | newRBufferSnapshot () const |
SkStreamAsset * | newStreamSnapshot () const |
void | validate () const |
Private Attributes | |
SkBufferHead * | fHead |
SkBufferBlock * | fTail |
size_t | fTotalUsed |
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.