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

Unified Diff: src/images/SkImageDecoder_libwebp.cpp

Issue 719213008: SkColorTable locking serves no purpose anymore. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: oops Created 6 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 | « src/images/SkImageDecoder_libpng.cpp ('k') | src/images/SkImageEncoder_argb.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/images/SkImageDecoder_libpng.cpp ('k') | src/images/SkImageEncoder_argb.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698