OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Apple Computer, Inc. | 2 * Copyright (C) 2006 Apple Computer, Inc. |
3 * | 3 * |
4 * Portions are Copyright (C) 2001-6 mozilla.org | 4 * Portions are Copyright (C) 2001-6 mozilla.org |
5 * | 5 * |
6 * Other contributors: | 6 * Other contributors: |
7 * Stuart Parmenter <stuart@mozilla.com> | 7 * Stuart Parmenter <stuart@mozilla.com> |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Lesser General Public | 10 * modify it under the terms of the GNU Lesser General Public |
(...skipping 19 matching lines...) Expand all Loading... |
30 * licenses (the MPL or the GPL) and not to allow others to use your | 30 * licenses (the MPL or the GPL) and not to allow others to use your |
31 * version of this file under the LGPL, indicate your decision by | 31 * version of this file under the LGPL, indicate your decision by |
32 * deletingthe provisions above and replace them with the notice and | 32 * deletingthe provisions above and replace them with the notice and |
33 * other provisions required by the MPL or the GPL, as the case may be. | 33 * other provisions required by the MPL or the GPL, as the case may be. |
34 * If you do not delete the provisions above, a recipient may use your | 34 * If you do not delete the provisions above, a recipient may use your |
35 * version of this file under any of the LGPL, the MPL or the GPL. | 35 * version of this file under any of the LGPL, the MPL or the GPL. |
36 */ | 36 */ |
37 | 37 |
38 #include "platform/image-decoders/jpeg/JPEGImageDecoder.h" | 38 #include "platform/image-decoders/jpeg/JPEGImageDecoder.h" |
39 | 39 |
| 40 #include <memory> |
40 #include "platform/PlatformInstrumentation.h" | 41 #include "platform/PlatformInstrumentation.h" |
41 #include "wtf/PtrUtil.h" | 42 #include "wtf/PtrUtil.h" |
42 #include <memory> | |
43 | 43 |
44 extern "C" { | 44 extern "C" { |
| 45 #include <setjmp.h> |
45 #include <stdio.h> // jpeglib.h needs stdio FILE. | 46 #include <stdio.h> // jpeglib.h needs stdio FILE. |
| 47 #include "iccjpeg.h" |
46 #include "jpeglib.h" | 48 #include "jpeglib.h" |
47 #include "iccjpeg.h" | |
48 #include <setjmp.h> | |
49 } | 49 } |
50 | 50 |
51 #if CPU(BIG_ENDIAN) || CPU(MIDDLE_ENDIAN) | 51 #if CPU(BIG_ENDIAN) || CPU(MIDDLE_ENDIAN) |
52 #error Blink assumes a little-endian target. | 52 #error Blink assumes a little-endian target. |
53 #endif | 53 #endif |
54 | 54 |
55 #if defined(JCS_ALPHA_EXTENSIONS) | 55 #if defined(JCS_ALPHA_EXTENSIONS) |
56 #define TURBO_JPEG_RGB_SWIZZLE | 56 #define TURBO_JPEG_RGB_SWIZZLE |
57 #if SK_B32_SHIFT // Output little-endian RGBA pixels (Android). | 57 #if SK_B32_SHIFT // Output little-endian RGBA pixels (Android). |
58 inline J_COLOR_SPACE rgbOutputColorSpace() { | 58 inline J_COLOR_SPACE rgbOutputColorSpace() { |
(...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1005 // has failed. | 1005 // has failed. |
1006 if (!m_reader->decode(onlySize) && isAllDataReceived()) | 1006 if (!m_reader->decode(onlySize) && isAllDataReceived()) |
1007 setFailed(); | 1007 setFailed(); |
1008 | 1008 |
1009 // If decoding is done or failed, we don't need the JPEGImageReader anymore. | 1009 // If decoding is done or failed, we don't need the JPEGImageReader anymore. |
1010 if (isComplete(this, onlySize) || failed()) | 1010 if (isComplete(this, onlySize) || failed()) |
1011 m_reader.reset(); | 1011 m_reader.reset(); |
1012 } | 1012 } |
1013 | 1013 |
1014 } // namespace blink | 1014 } // namespace blink |
OLD | NEW |