| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
| 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 #ifndef SkJpegDecoderMgr_DEFINED | 8 #ifndef SkJpegDecoderMgr_DEFINED |
| 9 #define SkJpegDecoderMgr_DEFINED | 9 #define SkJpegDecoderMgr_DEFINED |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 */ | 36 */ |
| 37 JpegDecoderMgr(SkStream* stream); | 37 JpegDecoderMgr(SkStream* stream); |
| 38 | 38 |
| 39 /* | 39 /* |
| 40 * Initialize decompress struct | 40 * Initialize decompress struct |
| 41 * Initialize the source manager | 41 * Initialize the source manager |
| 42 */ | 42 */ |
| 43 void init(); | 43 void init(); |
| 44 | 44 |
| 45 /* | 45 /* |
| 46 * Recommend a color type based on the encoded format | 46 * Returns the encoded color type of the jpeg, or kUnknown if the |
| 47 * color type can't be determined |
| 47 */ | 48 */ |
| 48 SkColorType getColorType(); | 49 SkEncodedInfo::Color getEncodedColor(); |
| 49 | 50 |
| 50 /* | 51 /* |
| 51 * Free memory used by the decode manager | 52 * Free memory used by the decode manager |
| 52 */ | 53 */ |
| 53 ~JpegDecoderMgr(); | 54 ~JpegDecoderMgr(); |
| 54 | 55 |
| 55 /* | 56 /* |
| 56 * Get the jump buffer in order to set an error return point | 57 * Get the jump buffer in order to set an error return point |
| 57 */ | 58 */ |
| 58 jmp_buf& getJmpBuf(); | 59 jmp_buf& getJmpBuf(); |
| 59 | 60 |
| 60 /* | 61 /* |
| 61 * Get function for the decompress info struct | 62 * Get function for the decompress info struct |
| 62 */ | 63 */ |
| 63 jpeg_decompress_struct* dinfo(); | 64 jpeg_decompress_struct* dinfo(); |
| 64 | 65 |
| 65 private: | 66 private: |
| 66 | 67 |
| 67 jpeg_decompress_struct fDInfo; | 68 jpeg_decompress_struct fDInfo; |
| 68 skjpeg_source_mgr fSrcMgr; | 69 skjpeg_source_mgr fSrcMgr; |
| 69 skjpeg_error_mgr fErrorMgr; | 70 skjpeg_error_mgr fErrorMgr; |
| 70 bool fInit; | 71 bool fInit; |
| 71 }; | 72 }; |
| 72 | 73 |
| 73 #endif | 74 #endif |
| OLD | NEW |