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 * Copyright (C) 2007-2009 Torch Mobile, Inc. | 9 * Copyright (C) 2007-2009 Torch Mobile, Inc. |
10 * | 10 * |
(...skipping 19 matching lines...) Expand all Loading... |
30 * applicable instead of those above. If you wish to allow use of your | 30 * applicable instead of those above. If you wish to allow use of your |
31 * version of this file only under the terms of one of those two | 31 * version of this file only under the terms of one of those two |
32 * licenses (the MPL or the GPL) and not to allow others to use your | 32 * licenses (the MPL or the GPL) and not to allow others to use your |
33 * version of this file under the LGPL, indicate your decision by | 33 * version of this file under the LGPL, indicate your decision by |
34 * deletingthe provisions above and replace them with the notice and | 34 * deletingthe provisions above and replace them with the notice and |
35 * other provisions required by the MPL or the GPL, as the case may be. | 35 * other provisions required by the MPL or the GPL, as the case may be. |
36 * If you do not delete the provisions above, a recipient may use your | 36 * If you do not delete the provisions above, a recipient may use your |
37 * version of this file under any of the LGPL, the MPL or the GPL. | 37 * version of this file under any of the LGPL, the MPL or the GPL. |
38 */ | 38 */ |
39 | 39 |
40 #include "sky/engine/config.h" | |
41 #include "platform/image-decoders/jpeg/JPEGImageDecoder.h" | 40 #include "platform/image-decoders/jpeg/JPEGImageDecoder.h" |
42 | 41 |
43 #include "sky/engine/wtf/PassOwnPtr.h" | 42 #include "sky/engine/wtf/PassOwnPtr.h" |
44 #include "sky/engine/wtf/dtoa/utils.h" | 43 #include "sky/engine/wtf/dtoa/utils.h" |
45 | 44 |
46 extern "C" { | 45 extern "C" { |
47 #include <stdio.h> // jpeglib.h needs stdio FILE. | 46 #include <stdio.h> // jpeglib.h needs stdio FILE. |
48 #include "jpeglib.h" | 47 #include "jpeglib.h" |
49 #if USE(ICCJPEG) | 48 #if USE(ICCJPEG) |
50 #include "iccjpeg.h" | 49 #include "iccjpeg.h" |
(...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
992 // has failed. | 991 // has failed. |
993 if (!m_reader->decode(*m_data, onlySize) && isAllDataReceived()) | 992 if (!m_reader->decode(*m_data, onlySize) && isAllDataReceived()) |
994 setFailed(); | 993 setFailed(); |
995 // If we're done decoding the image, we don't need the JPEGImageReader | 994 // If we're done decoding the image, we don't need the JPEGImageReader |
996 // anymore. (If we failed, |m_reader| has already been cleared.) | 995 // anymore. (If we failed, |m_reader| has already been cleared.) |
997 else if ((!m_frameBufferCache.isEmpty() && (m_frameBufferCache[0].status() =
= ImageFrame::FrameComplete)) || (hasImagePlanes() && !onlySize)) | 996 else if ((!m_frameBufferCache.isEmpty() && (m_frameBufferCache[0].status() =
= ImageFrame::FrameComplete)) || (hasImagePlanes() && !onlySize)) |
998 m_reader.clear(); | 997 m_reader.clear(); |
999 } | 998 } |
1000 | 999 |
1001 } | 1000 } |
OLD | NEW |