diff options
Diffstat (limited to 'src/core/SkWriteBuffer.cpp')
-rw-r--r-- | src/core/SkWriteBuffer.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/SkWriteBuffer.cpp b/src/core/SkWriteBuffer.cpp index cca7d8170a..f2be41b266 100644 --- a/src/core/SkWriteBuffer.cpp +++ b/src/core/SkWriteBuffer.cpp @@ -206,9 +206,8 @@ void SkWriteBuffer::writeBitmap(const SkBitmap& bitmap) { } } - // Bitmap was not encoded. Record a zero, implying that the reader need not decode. - this->writeUInt(0); - bitmap.flatten(*this); + this->writeUInt(0); // signal raw pixels + SkBitmap::WriteRawPixels(this, bitmap); } void SkWriteBuffer::writeTypeface(SkTypeface* obj) { |