Only use JDCT_IFAST if it's supported.
authorscroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 17 Apr 2013 17:37:56 +0000 (17:37 +0000)
committerscroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 17 Apr 2013 17:37:56 +0000 (17:37 +0000)
When encoding to JPEG, do not switch to JDCT_IFAST unless
DCT_IFAST_SUPPORTED is defined.

Review URL: https://codereview.chromium.org/14031013

git-svn-id: http://skia.googlecode.com/svn/trunk@8728 2bbb7eff-a529-9590-31e7-b0007b416f81

src/images/SkImageDecoder_libjpeg.cpp

index b3dde47..9920bac 100644 (file)
@@ -965,7 +965,9 @@ protected:
 
         jpeg_set_defaults(&cinfo);
         jpeg_set_quality(&cinfo, quality, TRUE /* limit to baseline-JPEG values */);
+#ifdef DCT_IFAST_SUPPORTED
         cinfo.dct_method = JDCT_IFAST;
+#endif
 
         jpeg_start_compress(&cinfo, TRUE);