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

Side by Side Diff: src/images/SkJpegUtility.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/images/SkImageDecoder_libpng.cpp ('k') | no next file » | 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 2010 The Android Open Source Project 2 * Copyright 2010 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 "SkJpegUtility.h" 9 #include "SkJpegUtility.h"
10 10
11 #if defined(SK_BUILD_FOR_ANDROID) && !defined(SK_JPEG_NO_INDEX_SUPPORTED)
12 #define SK_JPEG_INDEX_SUPPORTED
13 #endif
14
15 ///////////////////////////////////////////////////////////////////// 11 /////////////////////////////////////////////////////////////////////
16 static void sk_init_source(j_decompress_ptr cinfo) { 12 static void sk_init_source(j_decompress_ptr cinfo) {
17 skjpeg_source_mgr* src = (skjpeg_source_mgr*)cinfo->src; 13 skjpeg_source_mgr* src = (skjpeg_source_mgr*)cinfo->src;
18 src->next_input_byte = (const JOCTET*)src->fBuffer; 14 src->next_input_byte = (const JOCTET*)src->fBuffer;
19 src->bytes_in_buffer = 0; 15 src->bytes_in_buffer = 0;
20 #ifdef SK_JPEG_INDEX_SUPPORTED 16 #ifdef SK_JPEG_INDEX_SUPPORTED
21 src->current_offset = 0; 17 src->current_offset = 0;
22 #endif 18 #endif
23 if (!src->fStream->rewind()) { 19 if (!src->fStream->rewind()) {
24 SkDebugf("xxxxxxxxxxxxxx failure to rewind\n"); 20 SkDebugf("xxxxxxxxxxxxxx failure to rewind\n");
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 void skjpeg_error_exit(j_common_ptr cinfo) { 157 void skjpeg_error_exit(j_common_ptr cinfo) {
162 skjpeg_error_mgr* error = (skjpeg_error_mgr*)cinfo->err; 158 skjpeg_error_mgr* error = (skjpeg_error_mgr*)cinfo->err;
163 159
164 (*error->output_message) (cinfo); 160 (*error->output_message) (cinfo);
165 161
166 /* Let the memory manager delete any temp files before we die */ 162 /* Let the memory manager delete any temp files before we die */
167 jpeg_destroy(cinfo); 163 jpeg_destroy(cinfo);
168 164
169 longjmp(error->fJmpBuf, -1); 165 longjmp(error->fJmpBuf, -1);
170 } 166 }
OLDNEW
« no previous file with comments | « src/images/SkImageDecoder_libpng.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698