OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. |
3 * Copyright (C) 2008-2009 Torch Mobile, Inc. | 3 * Copyright (C) 2008-2009 Torch Mobile, Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 13 matching lines...) Expand all Loading... |
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
25 */ | 25 */ |
26 | 26 |
27 #ifndef JPEGImageDecoder_h | 27 #ifndef JPEGImageDecoder_h |
28 #define JPEGImageDecoder_h | 28 #define JPEGImageDecoder_h |
29 | 29 |
30 #include "ImageDecoder.h" | 30 #include "ImageDecoder.h" |
31 #include <stdio.h> // Needed by jpeglib.h for FILE. | 31 #include <stdio.h> // Needed by jpeglib.h for FILE. |
32 #include <wtf/OwnPtr.h> | 32 #include <wtf/OwnPtr.h> |
33 | 33 |
34 #if OS(WINCE) | |
35 // Remove warning: 'FAR' macro redefinition | |
36 #undef FAR | |
37 | |
38 // jmorecfg.h in libjpeg checks for XMD_H with the comment: "X11/xmd.h correctly
defines INT32" | |
39 // fix INT32 redefinition error by pretending we are X11/xmd.h | |
40 #define XMD_H | |
41 #endif | |
42 | |
43 extern "C" { | 34 extern "C" { |
44 #include "jpeglib.h" | 35 #include "jpeglib.h" |
45 } | 36 } |
46 | 37 |
47 namespace WebCore { | 38 namespace WebCore { |
48 | 39 |
49 class JPEGImageReader; | 40 class JPEGImageReader; |
50 | 41 |
51 // This class decodes the JPEG image format. | 42 // This class decodes the JPEG image format. |
52 class JPEGImageDecoder : public ImageDecoder { | 43 class JPEGImageDecoder : public ImageDecoder { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 78 |
88 template <J_COLOR_SPACE colorSpace, bool isScaled> | 79 template <J_COLOR_SPACE colorSpace, bool isScaled> |
89 bool outputScanlines(ImageFrame& buffer); | 80 bool outputScanlines(ImageFrame& buffer); |
90 | 81 |
91 OwnPtr<JPEGImageReader> m_reader; | 82 OwnPtr<JPEGImageReader> m_reader; |
92 }; | 83 }; |
93 | 84 |
94 } // namespace WebCore | 85 } // namespace WebCore |
95 | 86 |
96 #endif | 87 #endif |
OLD | NEW |