OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Apple Computer, Inc. | 2 * Copyright (C) 2006 Apple Computer, Inc. |
3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
4 * | 4 * |
5 * Portions are Copyright (C) 2001 mozilla.org | 5 * Portions are Copyright (C) 2001 mozilla.org |
6 * | 6 * |
7 * Other contributors: | 7 * Other contributors: |
8 * Stuart Parmenter <stuart@mozilla.com> | 8 * Stuart Parmenter <stuart@mozilla.com> |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 20 matching lines...) Expand all Loading... |
31 * licenses (the MPL or the GPL) and not to allow others to use your | 31 * licenses (the MPL or the GPL) and not to allow others to use your |
32 * version of this file under the LGPL, indicate your decision by | 32 * version of this file under the LGPL, indicate your decision by |
33 * deletingthe provisions above and replace them with the notice and | 33 * deletingthe provisions above and replace them with the notice and |
34 * other provisions required by the MPL or the GPL, as the case may be. | 34 * other provisions required by the MPL or the GPL, as the case may be. |
35 * If you do not delete the provisions above, a recipient may use your | 35 * If you do not delete the provisions above, a recipient may use your |
36 * version of this file under any of the LGPL, the MPL or the GPL. | 36 * version of this file under any of the LGPL, the MPL or the GPL. |
37 */ | 37 */ |
38 | 38 |
39 #include "platform/image-decoders/png/PNGImageReader.h" | 39 #include "platform/image-decoders/png/PNGImageReader.h" |
40 | 40 |
| 41 #include <memory> |
41 #include "platform/image-decoders/SegmentReader.h" | 42 #include "platform/image-decoders/SegmentReader.h" |
42 #include "platform/image-decoders/png/PNGImageDecoder.h" | 43 #include "platform/image-decoders/png/PNGImageDecoder.h" |
43 #include "png.h" | 44 #include "png.h" |
44 #include "wtf/PtrUtil.h" | 45 #include "wtf/PtrUtil.h" |
45 #include <memory> | |
46 | 46 |
47 namespace { | 47 namespace { |
48 | 48 |
49 inline blink::PNGImageDecoder* imageDecoder(png_structp png) { | 49 inline blink::PNGImageDecoder* imageDecoder(png_structp png) { |
50 return static_cast<blink::PNGImageDecoder*>(png_get_progressive_ptr(png)); | 50 return static_cast<blink::PNGImageDecoder*>(png_get_progressive_ptr(png)); |
51 } | 51 } |
52 | 52 |
53 void PNGAPI pngHeaderAvailable(png_structp png, png_infop) { | 53 void PNGAPI pngHeaderAvailable(png_structp png, png_infop) { |
54 imageDecoder(png)->headerAvailable(); | 54 imageDecoder(png)->headerAvailable(); |
55 } | 55 } |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 segmentLength); | 108 segmentLength); |
109 if (sizeOnly ? m_decoder->isDecodedSizeAvailable() | 109 if (sizeOnly ? m_decoder->isDecodedSizeAvailable() |
110 : m_decoder->frameIsCompleteAtIndex(0)) | 110 : m_decoder->frameIsCompleteAtIndex(0)) |
111 return true; | 111 return true; |
112 } | 112 } |
113 | 113 |
114 return false; | 114 return false; |
115 } | 115 } |
116 | 116 |
117 } // namespace blink | 117 } // namespace blink |
OLD | NEW |