| OLD | NEW |
| (Empty) |
| 1 | |
| 2 /* | |
| 3 * Copyright 2010 The Android Open Source Project | |
| 4 * | |
| 5 * Use of this source code is governed by a BSD-style license that can be | |
| 6 * found in the LICENSE file. | |
| 7 */ | |
| 8 | |
| 9 | |
| 10 #ifndef SkJpegUtility_DEFINED | |
| 11 #define SkJpegUtility_DEFINED | |
| 12 | |
| 13 #include "SkStream.h" | |
| 14 | |
| 15 extern "C" { | |
| 16 #include "jpeglib.h" | |
| 17 #include "jerror.h" | |
| 18 } | |
| 19 | |
| 20 #include <setjmp.h> | |
| 21 | |
| 22 /* Our error-handling struct. | |
| 23 * | |
| 24 */ | |
| 25 struct skjpeg_error_mgr : jpeg_error_mgr { | |
| 26 jmp_buf fJmpBuf; | |
| 27 }; | |
| 28 | |
| 29 | |
| 30 void skjpeg_error_exit(j_common_ptr cinfo); | |
| 31 | |
| 32 ///////////////////////////////////////////////////////////////////////////// | |
| 33 /* Our destination struct for directing decompressed pixels to our stream | |
| 34 * object. | |
| 35 */ | |
| 36 struct skjpeg_destination_mgr : jpeg_destination_mgr { | |
| 37 skjpeg_destination_mgr(SkWStream* stream); | |
| 38 | |
| 39 SkWStream* fStream; | |
| 40 | |
| 41 enum { | |
| 42 kBufferSize = 1024 | |
| 43 }; | |
| 44 uint8_t fBuffer[kBufferSize]; | |
| 45 }; | |
| 46 | |
| 47 #endif | |
| OLD | NEW |