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 24 matching lines...) Expand all Loading... |
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 <memory> |
41 #include "platform/instrumentation/PlatformInstrumentation.h" | 41 #include "platform/instrumentation/PlatformInstrumentation.h" |
42 #include "platform/wtf/PtrUtil.h" | 42 #include "platform/wtf/PtrUtil.h" |
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 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1008 // has failed. | 1008 // has failed. |
1009 if (!reader_->Decode(only_size) && IsAllDataReceived()) | 1009 if (!reader_->Decode(only_size) && IsAllDataReceived()) |
1010 SetFailed(); | 1010 SetFailed(); |
1011 | 1011 |
1012 // If decoding is done or failed, we don't need the JPEGImageReader anymore. | 1012 // If decoding is done or failed, we don't need the JPEGImageReader anymore. |
1013 if (IsComplete(this, only_size) || Failed()) | 1013 if (IsComplete(this, only_size) || Failed()) |
1014 reader_.reset(); | 1014 reader_.reset(); |
1015 } | 1015 } |
1016 | 1016 |
1017 } // namespace blink | 1017 } // namespace blink |
OLD | NEW |