Review URL: https://codereview.appspot.com/7138063
git-svn-id: http://skia.googlecode.com/svn/trunk@7335
2bbb7eff-a529-9590-31e7-
b0007b416f81
}
size_t SkOrderedWriteBuffer::writeStream(SkStream* stream, size_t length) {
- return fWriter.readFromStream(stream, length);
+ fWriter.write32(length);
+ size_t bytesWritten = fWriter.readFromStream(stream, length);
+ if (bytesWritten < length) {
+ fWriter.reservePad(length - bytesWritten);
+ }
+ return bytesWritten;
}
bool SkOrderedWriteBuffer::writeToStream(SkWStream* stream) {