Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Side by Side Diff: src/images/SkImageDecoder_libjpeg.cpp

Issue 1406153015: Remove dependencies on Android's forked decoder libraries (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: It is 2015 Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/codec/SkCodec.cpp ('k') | src/images/SkImageDecoder_libpng.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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);
OLDNEW
« no previous file with comments | « src/codec/SkCodec.cpp ('k') | src/images/SkImageDecoder_libpng.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698