Skia
2DGraphicsLibrary
|
Helper class that allows for incrementally building up the data needed to create a SkDataTable. More...
#include <SkDataTable.h>
Public Member Functions | |
SkDataTableBuilder (size_t minChunkSize) | |
int | count () const |
size_t | minChunkSize () const |
void | reset (size_t minChunkSize) |
Forget any previously appended entries, setting count() back to 0. | |
void | reset () |
void | append (const void *data, size_t size) |
Copy size-bytes from data, and append it to the growing SkDataTable. | |
void | appendStr (const char str[]) |
Helper version of append() passes strlen() + 1 for the size, so the trailing-zero will be copied as well. | |
void | appendString (const SkString &string) |
Helper version of append() passes string.size() + 1 for the size, so the trailing-zero will be copied as well. | |
sk_sp< SkDataTable > | detachDataTable () |
Return an SkDataTable from the accumulated entries that were added by calls to append(). More... | |
Private Attributes | |
SkTDArray< SkDataTable::Dir > | fDir |
SkChunkAlloc * | fHeap |
size_t | fMinChunkSize |
Helper class that allows for incrementally building up the data needed to create a SkDataTable.
sk_sp<SkDataTable> SkDataTableBuilder::detachDataTable | ( | ) |
Return an SkDataTable from the accumulated entries that were added by calls to append().
This call also clears any accumluated entries from this builder, so its count() will be 0 after this call.