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

Unified Diff: src/codec/SkJpegCodec.cpp

Issue 1349563007: Disable dithering in libjpeg-turbo for 565 decodes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Added suggested test Created 5 years, 3 months 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 | « no previous file | tests/CodexTest.cpp » ('j') | tests/CodexTest.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkJpegCodec.cpp
diff --git a/src/codec/SkJpegCodec.cpp b/src/codec/SkJpegCodec.cpp
index 2baf51a00925db4055e53158d040324f565f062f..4557e45673eb124a4ae346467b77a21cc955f8fa 100644
--- a/src/codec/SkJpegCodec.cpp
+++ b/src/codec/SkJpegCodec.cpp
@@ -246,8 +246,12 @@ bool SkJpegCodec::setOutputColorSpace(const SkImageInfo& dst) {
return true;
case kRGB_565_SkColorType:
if (isCMYK) {
+ // FIXME (msarett): We need to support 565 here. It's not hard to do, considering
+ // we already convert CMYK to RGBA, I just need to do it. I think it might be
+ // best to do this in SkSwizzler and also move convert_CMYK_to_RGBA into SkSwizzler.
return false;
} else {
+ fDecoderMgr->dinfo()->dither_mode = JDITHER_NONE;
fDecoderMgr->dinfo()->out_color_space = JCS_RGB565;
}
return true;
« no previous file with comments | « no previous file | tests/CodexTest.cpp » ('j') | tests/CodexTest.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698