Index: src/core/SkOrderedWriteBuffer.cpp |
diff --git a/src/core/SkOrderedWriteBuffer.cpp b/src/core/SkOrderedWriteBuffer.cpp |
index 1c15e43ef02eb08d7d434c2b893e0a1488f069ab..25ca769168da80bd3556b0c831b5a0483e682a36 100644 |
--- a/src/core/SkOrderedWriteBuffer.cpp |
+++ b/src/core/SkOrderedWriteBuffer.cpp |
@@ -310,10 +310,10 @@ void SkOrderedWriteBuffer::writeFlattenable(const SkFlattenable* flattenable) { |
// make room for the size of the flattened object |
(void)fWriter.reserve(sizeof(uint32_t)); |
// record the current size, so we can subtract after the object writes. |
- uint32_t offset = fWriter.size(); |
+ uint32_t offset = fWriter.bytesWritten(); |
// now flatten the object |
flattenObject(flattenable, *this); |
- uint32_t objSize = fWriter.size() - offset; |
+ uint32_t objSize = fWriter.bytesWritten() - offset; |
// record the obj's size |
*fWriter.peek32(offset - sizeof(uint32_t)) = objSize; |
} |