Index: src/core/SkWriteBuffer.cpp |
diff --git a/src/core/SkWriteBuffer.cpp b/src/core/SkWriteBuffer.cpp |
index b90a81e631593aab3cc53ddbc71e29a882a567f3..2b35b67702d490aa7e4b7c4df3f53669321d0c96 100644 |
--- a/src/core/SkWriteBuffer.cpp |
+++ b/src/core/SkWriteBuffer.cpp |
@@ -136,8 +136,7 @@ bool SkWriteBuffer::writeToStream(SkWStream* stream) { |
static void write_encoded_bitmap(SkWriteBuffer* buffer, SkData* data, |
const SkIPoint& origin) { |
- buffer->writeUInt(SkToU32(data->size())); |
- buffer->getWriter32()->writePad(data->data(), data->size()); |
+ buffer->writeDataAsByteArray(data); |
buffer->write32(origin.fX); |
buffer->write32(origin.fY); |
} |