Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Unified Diff: src/core/SkWriteBuffer.cpp

Issue 1501303002: SkPixelSerializer: support indexed pixels (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-12-07 (Monday) 15:24:44 EST Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkPixelSerializer.h ('k') | src/image/SkImage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « include/core/SkPixelSerializer.h ('k') | src/image/SkImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698