aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/images
diff options
context:
space:
mode:
authorGravatar scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-04-17 17:37:56 +0000
committerGravatar scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-04-17 17:37:56 +0000
commitb7decc539887069f3fb0f9fc80d543b437bdd624 (patch)
tree0021fd6a7ad7a9ac5707be87ebf9031ae009fcea /src/images
parent7ec5e394e7d8af08bf8f45c8c09763572fd2b54d (diff)
Only use JDCT_IFAST if it's supported.
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
Diffstat (limited to 'src/images')
-rw-r--r--src/images/SkImageDecoder_libjpeg.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/images/SkImageDecoder_libjpeg.cpp b/src/images/SkImageDecoder_libjpeg.cpp
index b3dde476c8..9920bacc45 100644
--- a/src/images/SkImageDecoder_libjpeg.cpp
+++ b/src/images/SkImageDecoder_libjpeg.cpp
@@ -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);