Chromium Code Reviews| Index: src/images/SkImageDecoder_libjpeg.cpp |
| diff --git a/src/images/SkImageDecoder_libjpeg.cpp b/src/images/SkImageDecoder_libjpeg.cpp |
| index 4f32aa918614c8e72afd9cd4a7f59e5335ac3f62..67bca1f4ae8d9d38259a8b98e5d3f2ab24f679e7 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(); |
| - if (this->getPreferQualityOverSpeed()) { |
| - cinfo.dct_method = JDCT_ISLOW; |
| - } else { |
| +#ifdef DCT_IFAST_SUPPORTED |
| + if (!this->getPreferQualityOverSpeed()) { |
| cinfo.dct_method = JDCT_IFAST; |
| + } else { |
| +#endif |
| + cinfo.dct_method = JDCT_ISLOW; |
|
djsollen
2013/04/12 15:51:51
for readability I think it would be better to just
scroggo
2013/04/12 15:57:01
Done.
|
| +#ifdef DCT_IFAST_SUPPORTED |
| } |
| +#endif |
| cinfo.scale_num = 1; |
| cinfo.scale_denom = sampleSize; |