| Index: include/core/SkRWBuffer.h
|
| diff --git a/include/core/SkRWBuffer.h b/include/core/SkRWBuffer.h
|
| index 9626d28df9643ee836ba6a1e285ce456ec7101f0..451933f353cae3a367c57f74e239c137794aa4f1 100644
|
| --- a/include/core/SkRWBuffer.h
|
| +++ b/include/core/SkRWBuffer.h
|
| @@ -79,7 +79,15 @@ public:
|
| ~SkRWBuffer();
|
|
|
| size_t size() const { return fTotalUsed; }
|
| - void append(const void* buffer, size_t length);
|
| +
|
| + /**
|
| + * Append |length| bytes from |buffer|.
|
| + *
|
| + * If the caller knows in advance how much more data they are going to append, they can
|
| + * pass a |reserve| hint (representing the number of upcoming bytes *in addition* to the
|
| + * current append), to minimize the number of internal allocations.
|
| + */
|
| + void append(const void* buffer, size_t length, size_t reserve = 0);
|
|
|
| SkROBuffer* newRBufferSnapshot() const;
|
| SkStreamAsset* newStreamSnapshot() const;
|
|
|