aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkWriter32.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/core/SkWriter32.h')
-rw-r--r--include/core/SkWriter32.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/include/core/SkWriter32.h b/include/core/SkWriter32.h
index 82cf346c8e..51044ab00e 100644
--- a/include/core/SkWriter32.h
+++ b/include/core/SkWriter32.h
@@ -46,17 +46,10 @@ public:
// return the current offset (will always be a multiple of 4)
uint32_t bytesWritten() const { return fSize; }
- // DEPRECATED: use bytesWritten instead TODO(mtklein): clean up
+ // DEPRECATED: use byetsWritten instead
uint32_t size() const { return this->bytesWritten(); }
- // Returns true if we've written only into the storage passed into constructor or reset.
- // (You may be able to use this to avoid a call to flatten.)
- bool wroteOnlyToStorage() const {
- return fHead == &fExternalBlock && this->bytesWritten() <= fExternalBlock.fSizeOfBlock;
- }
-
- void reset();
- void reset(void* storage, size_t size);
+ void reset();
// size MUST be multiple of 4
uint32_t* reserve(size_t size) {
@@ -70,6 +63,8 @@ public:
return block->alloc(size);
}
+ void reset(void* storage, size_t size);
+
bool writeBool(bool value) {
this->writeInt(value);
return value;