aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkWriter32.h
diff options
context:
space:
mode:
authorGravatar mtklein@google.com <mtklein@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-07-24 19:11:15 +0000
committerGravatar mtklein@google.com <mtklein@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-07-24 19:11:15 +0000
commit5174286bc5697e290d052fed994e8759fa5a4ed3 (patch)
treef48b740e82eb61dd908bd7353673f0eace24f5a6 /include/core/SkWriter32.h
parentcae5d8d5705081cb4d22af7a30be0f01bffce745 (diff)
Revert "Start from scratch on a faster SkFlatDictionary."
This reverts commit fec9bfa02d5d2b27bfa2dad3e37e5825a720784d. git-svn-id: http://skia.googlecode.com/svn/trunk@10331 2bbb7eff-a529-9590-31e7-b0007b416f81
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;