| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2007 The Android Open Source Project | 2 * Copyright 2007 The Android Open Source Project |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 | 8 |
| 9 #include "SkImageDecoder.h" | 9 #include "SkImageDecoder.h" |
| 10 #include "SkImageEncoder.h" | 10 #include "SkImageEncoder.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 SK_CONF_DECLARE(bool, c_suppressJPEGImageDecoderWarnings, | 47 SK_CONF_DECLARE(bool, c_suppressJPEGImageDecoderWarnings, |
| 48 "images.jpeg.suppressDecoderWarnings", | 48 "images.jpeg.suppressDecoderWarnings", |
| 49 DEFAULT_FOR_SUPPRESS_JPEG_IMAGE_DECODER_WARNINGS, | 49 DEFAULT_FOR_SUPPRESS_JPEG_IMAGE_DECODER_WARNINGS, |
| 50 "Suppress most JPG warnings when calling decode functions."); | 50 "Suppress most JPG warnings when calling decode functions."); |
| 51 SK_CONF_DECLARE(bool, c_suppressJPEGImageDecoderErrors, | 51 SK_CONF_DECLARE(bool, c_suppressJPEGImageDecoderErrors, |
| 52 "images.jpeg.suppressDecoderErrors", | 52 "images.jpeg.suppressDecoderErrors", |
| 53 DEFAULT_FOR_SUPPRESS_JPEG_IMAGE_DECODER_ERRORS, | 53 DEFAULT_FOR_SUPPRESS_JPEG_IMAGE_DECODER_ERRORS, |
| 54 "Suppress most JPG error messages when decode " | 54 "Suppress most JPG error messages when decode " |
| 55 "function fails."); | 55 "function fails."); |
| 56 | 56 |
| 57 #if defined(SK_BUILD_FOR_ANDROID) && !defined(SK_JPEG_NO_INDEX_SUPPORTED) | |
| 58 #define SK_JPEG_INDEX_SUPPORTED | |
| 59 #endif | |
| 60 | |
| 61 ////////////////////////////////////////////////////////////////////////// | 57 ////////////////////////////////////////////////////////////////////////// |
| 62 ////////////////////////////////////////////////////////////////////////// | 58 ////////////////////////////////////////////////////////////////////////// |
| 63 | 59 |
| 64 static void do_nothing_emit_message(jpeg_common_struct*, int) { | 60 static void do_nothing_emit_message(jpeg_common_struct*, int) { |
| 65 /* do nothing */ | 61 /* do nothing */ |
| 66 } | 62 } |
| 67 static void do_nothing_output_message(j_common_ptr) { | 63 static void do_nothing_output_message(j_common_ptr) { |
| 68 /* do nothing */ | 64 /* do nothing */ |
| 69 } | 65 } |
| 70 | 66 |
| (...skipping 1379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1450 return SkImageDecoder::kUnknown_Format; | 1446 return SkImageDecoder::kUnknown_Format; |
| 1451 } | 1447 } |
| 1452 | 1448 |
| 1453 static SkImageEncoder* sk_libjpeg_efactory(SkImageEncoder::Type t) { | 1449 static SkImageEncoder* sk_libjpeg_efactory(SkImageEncoder::Type t) { |
| 1454 return (SkImageEncoder::kJPEG_Type == t) ? new SkJPEGImageEncoder : nullptr; | 1450 return (SkImageEncoder::kJPEG_Type == t) ? new SkJPEGImageEncoder : nullptr; |
| 1455 } | 1451 } |
| 1456 | 1452 |
| 1457 static SkImageDecoder_DecodeReg gDReg(sk_libjpeg_dfactory); | 1453 static SkImageDecoder_DecodeReg gDReg(sk_libjpeg_dfactory); |
| 1458 static SkImageDecoder_FormatReg gFormatReg(get_format_jpeg); | 1454 static SkImageDecoder_FormatReg gFormatReg(get_format_jpeg); |
| 1459 static SkImageEncoder_EncodeReg gEReg(sk_libjpeg_efactory); | 1455 static SkImageEncoder_EncodeReg gEReg(sk_libjpeg_efactory); |
| OLD | NEW |