OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2010 The Android Open Source Project | 3 * Copyright 2010 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef SkJpegUtility_DEFINED | 10 #ifndef SkJpegUtility_DEFINED |
11 #define SkJpegUtility_DEFINED | 11 #define SkJpegUtility_DEFINED |
12 | 12 |
13 #include "SkImageDecoder.h" | 13 #include "SkImageDecoder.h" |
14 #include "SkStream.h" | 14 #include "SkStream.h" |
15 | 15 |
16 extern "C" { | 16 extern "C" { |
| 17 #ifdef SK_BUILD_FOR_ANDROID |
| 18 #include "manglejpeglib.h" |
| 19 #else |
17 #include "jpeglib.h" | 20 #include "jpeglib.h" |
| 21 #endif |
18 #include "jerror.h" | 22 #include "jerror.h" |
19 } | 23 } |
20 | 24 |
21 #include <setjmp.h> | 25 #include <setjmp.h> |
22 | 26 |
23 /* Our error-handling struct. | 27 /* Our error-handling struct. |
24 * | 28 * |
25 */ | 29 */ |
26 struct skjpeg_error_mgr : jpeg_error_mgr { | 30 struct skjpeg_error_mgr : jpeg_error_mgr { |
27 jmp_buf fJmpBuf; | 31 jmp_buf fJmpBuf; |
(...skipping 28 matching lines...) Expand all Loading... |
56 | 60 |
57 SkWStream* fStream; | 61 SkWStream* fStream; |
58 | 62 |
59 enum { | 63 enum { |
60 kBufferSize = 1024 | 64 kBufferSize = 1024 |
61 }; | 65 }; |
62 uint8_t fBuffer[kBufferSize]; | 66 uint8_t fBuffer[kBufferSize]; |
63 }; | 67 }; |
64 | 68 |
65 #endif | 69 #endif |
OLD | NEW |