diff options
author | skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-12-22 02:02:33 +0000 |
---|---|---|
committer | skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-12-22 02:02:33 +0000 |
commit | b89a03c890668f98d9f8b269b6ad00824409435b (patch) | |
tree | 68074603a57ca6d77f5ea08505ae4a3ebd51e98b /include | |
parent | db0b3e099f888213535c4ad4c785b84544309033 (diff) |
Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6930 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkWriter32.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/core/SkWriter32.h b/include/core/SkWriter32.h index 3e0b012997..f6c216f067 100644 --- a/include/core/SkWriter32.h +++ b/include/core/SkWriter32.h @@ -49,11 +49,11 @@ public: uint32_t size() const { return this->bytesWritten(); } void reset(); - + // size MUST be multiple of 4 uint32_t* reserve(size_t size) { SkASSERT(SkAlign4(size) == size); - + Block* block = fTail; if (NULL == block || block->available() < size) { block = this->doReserve(size); @@ -219,13 +219,13 @@ private: void* ptr = this->base() + offset; return (uint32_t*)ptr; } - + void rewind() { fNext = NULL; fAllocatedSoFar = 0; // keep fSizeOfBlock as is } - + static Block* Create(size_t size) { SkASSERT(SkIsAlign4(size)); Block* block = (Block*)sk_malloc_throw(sizeof(Block) + size); @@ -251,7 +251,7 @@ private: enum { MIN_BLOCKSIZE = sizeof(SkWriter32::Block) + sizeof(intptr_t) }; - + Block fExternalBlock; Block* fHead; Block* fTail; @@ -265,7 +265,7 @@ private: } Block* newBlock(size_t bytes); - + // only call from reserve() Block* doReserve(size_t bytes); |