| Index: src/core/SkWriteBuffer.cpp
|
| diff --git a/src/core/SkWriteBuffer.cpp b/src/core/SkWriteBuffer.cpp
|
| index 060bd43c6f2697e8f9583e8f4f2e016dc92236cc..ccf1f37dd8fb890593665f177f248949218a38f7 100644
|
| --- a/src/core/SkWriteBuffer.cpp
|
| +++ b/src/core/SkWriteBuffer.cpp
|
| @@ -182,6 +182,13 @@ void SkBinaryWriteBuffer::writeImage(const SkImage* image) {
|
| return;
|
| }
|
|
|
| + SkBitmap bm;
|
| + if (image->asLegacyBitmap(&bm, SkImage::kRO_LegacyBitmapMode)) {
|
| + this->writeUInt(1); // signal raw pixels.
|
| + SkBitmap::WriteRawPixels(this, bm);
|
| + return;
|
| + }
|
| +
|
| this->writeUInt(0); // signal no pixels (in place of the size of the encoded data)
|
| }
|
|
|
|
|