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

Unified Diff: src/images/SkImageEncoder_argb.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_libwebp.cpp ('k') | src/opts/SkBitmapProcState_opts_arm.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkImageEncoder_argb.cpp
diff --git a/src/images/SkImageEncoder_argb.cpp b/src/images/SkImageEncoder_argb.cpp
index 296491eef81864ce0c7f48ec0af7b99c1f25f7be..02d5490452d7c092d4e98e93c8e209a4fc1cba3f 100644
--- a/src/images/SkImageEncoder_argb.cpp
+++ b/src/images/SkImageEncoder_argb.cpp
@@ -98,8 +98,7 @@ bool SkARGBImageEncoder::onEncode(SkWStream* stream, const SkBitmap& bitmap, int
return false;
}
- SkAutoLockColors ctLocker;
- const SkPMColor* colors = ctLocker.lockColors(bitmap);
+ const SkPMColor* colors = bitmap.getColorTable() ? bitmap.getColorTable()->readColors() : NULL;
const int argbStride = bitmap.width() * 4;
SkAutoTDeleteArray<uint8_t> ada(new uint8_t[argbStride]);
« no previous file with comments | « src/images/SkImageDecoder_libwebp.cpp ('k') | src/opts/SkBitmapProcState_opts_arm.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698