| OLD | NEW | 
|    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  | 
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   95  |   95  | 
|   96 /////////////////////////////////////////////////////////////////////////////// |   96 /////////////////////////////////////////////////////////////////////////////// | 
|   97  |   97  | 
|   98 skjpeg_source_mgr::skjpeg_source_mgr(SkStream* stream, SkImageDecoder* decoder) |   98 skjpeg_source_mgr::skjpeg_source_mgr(SkStream* stream, SkImageDecoder* decoder) | 
|   99     : fStream(stream) |   99     : fStream(stream) | 
|  100     , fDecoder(decoder) { |  100     , fDecoder(decoder) { | 
|  101  |  101  | 
|  102     init_source = sk_init_source; |  102     init_source = sk_init_source; | 
|  103     fill_input_buffer = sk_fill_input_buffer; |  103     fill_input_buffer = sk_fill_input_buffer; | 
|  104     skip_input_data = sk_skip_input_data; |  104     skip_input_data = sk_skip_input_data; | 
|  105     resync_to_restart = jpeg_resync_to_restart; |  105     resync_to_restart = jResyncRestart; | 
|  106     term_source = sk_term_source; |  106     term_source = sk_term_source; | 
|  107 #ifdef SK_BUILD_FOR_ANDROID |  107 #ifdef SK_BUILD_FOR_ANDROID | 
|  108     seek_input_data = sk_seek_input_data; |  108     seek_input_data = sk_seek_input_data; | 
|  109 #endif |  109 #endif | 
|  110 //    SkDebugf("**************** use memorybase %p %d\n", fMemoryBase, fMemoryBa
     seSize); |  110 //    SkDebugf("**************** use memorybase %p %d\n", fMemoryBase, fMemoryBa
     seSize); | 
|  111 } |  111 } | 
|  112  |  112  | 
|  113 /////////////////////////////////////////////////////////////////////////////// |  113 /////////////////////////////////////////////////////////////////////////////// | 
|  114  |  114  | 
|  115 static void sk_init_destination(j_compress_ptr cinfo) { |  115 static void sk_init_destination(j_compress_ptr cinfo) { | 
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  153     this->empty_output_buffer = sk_empty_output_buffer; |  153     this->empty_output_buffer = sk_empty_output_buffer; | 
|  154     this->term_destination = sk_term_destination; |  154     this->term_destination = sk_term_destination; | 
|  155 } |  155 } | 
|  156  |  156  | 
|  157 void skjpeg_error_exit(j_common_ptr cinfo) { |  157 void skjpeg_error_exit(j_common_ptr cinfo) { | 
|  158     skjpeg_error_mgr* error = (skjpeg_error_mgr*)cinfo->err; |  158     skjpeg_error_mgr* error = (skjpeg_error_mgr*)cinfo->err; | 
|  159  |  159  | 
|  160     (*error->output_message) (cinfo); |  160     (*error->output_message) (cinfo); | 
|  161  |  161  | 
|  162     /* Let the memory manager delete any temp files before we die */ |  162     /* Let the memory manager delete any temp files before we die */ | 
|  163     jpeg_destroy(cinfo); |  163     jDestroy(cinfo); | 
|  164  |  164  | 
|  165     longjmp(error->fJmpBuf, -1); |  165     longjmp(error->fJmpBuf, -1); | 
|  166 } |  166 } | 
| OLD | NEW |