Index: src/images/SkImageDecoder_libwebp.cpp |
diff --git a/src/images/SkImageDecoder_libwebp.cpp b/src/images/SkImageDecoder_libwebp.cpp |
index 8bf15c92e6235b52751a444aac5ecf6a898f14e2..2a7bb0fe59189d6ddccc795ec30e4ff6a0330d8f 100644 |
--- a/src/images/SkImageDecoder_libwebp.cpp |
+++ b/src/images/SkImageDecoder_libwebp.cpp |
@@ -621,7 +621,6 @@ bool SkWEBPImageEncoder::onEncode(SkWStream* stream, const SkBitmap& bm, |
} |
SkAutoLockPixels alp(bm); |
- SkAutoLockColors ctLocker; |
if (NULL == bm.getPixels()) { |
return false; |
} |
@@ -638,7 +637,7 @@ bool SkWEBPImageEncoder::onEncode(SkWStream* stream, const SkBitmap& bm, |
pic.writer = stream_writer; |
pic.custom_ptr = (void*)stream; |
- const SkPMColor* colors = ctLocker.lockColors(bm); |
+ const SkPMColor* colors = bm.getColorTable() ? bm.getColorTable()->readColors() : NULL; |
const uint8_t* src = (uint8_t*)bm.getPixels(); |
const int rgbStride = pic.width * bpp; |