Index: src/core/SkWriteBuffer.cpp |
diff --git a/src/core/SkWriteBuffer.cpp b/src/core/SkWriteBuffer.cpp |
index 1dfe0b3972c62b6b8e68cc6f6d92dc8782935b97..f8b31954037fbf7fcab6ade2d84f5ba03fd976bd 100644 |
--- a/src/core/SkWriteBuffer.cpp |
+++ b/src/core/SkWriteBuffer.cpp |
@@ -200,11 +200,8 @@ void SkWriteBuffer::writeBitmap(const SkBitmap& bitmap) { |
// see if the caller wants to manually encode |
SkAutoPixmapUnlock result; |
if (fPixelSerializer && bitmap.requestLock(&result)) { |
- const SkPixmap& pmap = result.pixmap(); |
SkASSERT(nullptr == fBitmapHeap); |
- SkAutoDataUnref data(fPixelSerializer->encodePixels(pmap.info(), |
- pmap.addr(), |
- pmap.rowBytes())); |
+ SkAutoDataUnref data(fPixelSerializer->encode(result.pixmap())); |
if (data.get() != nullptr) { |
// if we have to "encode" the bitmap, then we assume there is no |
// offset to share, since we are effectively creating a new pixelref |