Index: src/core/SkWriteBuffer.cpp |
diff --git a/src/core/SkWriteBuffer.cpp b/src/core/SkWriteBuffer.cpp |
index cca7d8170ac52684b94ae4bf846fe43419bb03c5..f2be41b266b612207bc1222e4291feafa96fb1d1 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) { |