diff options
author | 2013-04-12 16:28:21 +0000 | |
---|---|---|
committer | 2013-04-12 16:28:21 +0000 | |
commit | 3acd3fcfad2d3f7fa3379ea8d26c9b870298b6d0 (patch) | |
tree | 86557f410d63549229b346f7dd7da8abc5afa97c /src/images | |
parent | dd96eb4f5c84a8225396d9ce0ca65d4d8966d741 (diff) |
Only use JDCT_FAST if it is supported in jpeg.
Fixes a bug where jpeg decoder did not work on linux.
Review URL: https://codereview.chromium.org/14188002
git-svn-id: http://skia.googlecode.com/svn/trunk@8661 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/images')
-rw-r--r-- | src/images/SkImageDecoder_libjpeg.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/images/SkImageDecoder_libjpeg.cpp b/src/images/SkImageDecoder_libjpeg.cpp index 4f32aa9186..b3dde476c8 100644 --- a/src/images/SkImageDecoder_libjpeg.cpp +++ b/src/images/SkImageDecoder_libjpeg.cpp @@ -268,11 +268,15 @@ bool SkJPEGImageDecoder::onDecode(SkStream* stream, SkBitmap* bm, Mode mode) { */ int sampleSize = this->getSampleSize(); +#ifdef DCT_IFAST_SUPPORTED if (this->getPreferQualityOverSpeed()) { cinfo.dct_method = JDCT_ISLOW; } else { cinfo.dct_method = JDCT_IFAST; } +#else + cinfo.dct_method = JDCT_ISLOW; +#endif cinfo.scale_num = 1; cinfo.scale_denom = sampleSize; |