| 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 20 matching lines...) Expand all Loading... |
| 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 "config.h" | 40 #include "config.h" |
| 41 #include "core/platform/image-decoders/jpeg/JPEGImageDecoder.h" | 41 #include "platform/image-decoders/jpeg/JPEGImageDecoder.h" |
| 42 | 42 |
| 43 #include "platform/PlatformInstrumentation.h" | 43 #include "platform/PlatformInstrumentation.h" |
| 44 #include "wtf/PassOwnPtr.h" | 44 #include "wtf/PassOwnPtr.h" |
| 45 #include "wtf/dtoa/utils.h" | 45 #include "wtf/dtoa/utils.h" |
| 46 | 46 |
| 47 extern "C" { | 47 extern "C" { |
| 48 #include <stdio.h> // jpeglib.h needs stdio FILE. | 48 #include <stdio.h> // jpeglib.h needs stdio FILE. |
| 49 #include "jpeglib.h" | 49 #include "jpeglib.h" |
| 50 #if USE(ICCJPEG) | 50 #if USE(ICCJPEG) |
| 51 #include "iccjpeg.h" | 51 #include "iccjpeg.h" |
| (...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 795 // has failed. | 795 // has failed. |
| 796 if (!m_reader->decode(*m_data, onlySize) && isAllDataReceived()) | 796 if (!m_reader->decode(*m_data, onlySize) && isAllDataReceived()) |
| 797 setFailed(); | 797 setFailed(); |
| 798 // If we're done decoding the image, we don't need the JPEGImageReader | 798 // If we're done decoding the image, we don't need the JPEGImageReader |
| 799 // anymore. (If we failed, |m_reader| has already been cleared.) | 799 // anymore. (If we failed, |m_reader| has already been cleared.) |
| 800 else if (!m_frameBufferCache.isEmpty() && (m_frameBufferCache[0].status() ==
ImageFrame::FrameComplete)) | 800 else if (!m_frameBufferCache.isEmpty() && (m_frameBufferCache[0].status() ==
ImageFrame::FrameComplete)) |
| 801 m_reader.clear(); | 801 m_reader.clear(); |
| 802 } | 802 } |
| 803 | 803 |
| 804 } | 804 } |
| OLD | NEW |