зеркало из https://github.com/mozilla/moz-skia.git
Ensure that streams written using SkFlattenableBuffer's can be read with readByteArray(...)
Review URL: https://codereview.appspot.com/7138063 git-svn-id: http://skia.googlecode.com/svn/trunk@7335 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
98ded84b80
Коммит
e782f5ee47
|
@ -132,7 +132,12 @@ void SkOrderedWriteBuffer::writePath(const SkPath& path) {
|
|||
}
|
||||
|
||||
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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче