OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2008, 2009, Google Inc. All rights reserved. | 2 * Copyright (c) 2008, 2009, Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 15 matching lines...) Expand all Loading... |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef ICOImageDecoder_h | 31 #ifndef ICOImageDecoder_h |
32 #define ICOImageDecoder_h | 32 #define ICOImageDecoder_h |
33 | 33 |
34 #include "platform/image-decoders/FastSharedBufferReader.h" | 34 #include "platform/image-decoders/FastSharedBufferReader.h" |
35 #include "platform/image-decoders/bmp/BMPImageReader.h" | 35 #include "platform/image-decoders/bmp/BMPImageReader.h" |
36 #include <memory> | |
37 | 36 |
38 namespace blink { | 37 namespace blink { |
39 | 38 |
40 class PNGImageDecoder; | 39 class PNGImageDecoder; |
41 | 40 |
42 // This class decodes the ICO and CUR image formats. | 41 // This class decodes the ICO and CUR image formats. |
43 class PLATFORM_EXPORT ICOImageDecoder final : public ImageDecoder { | 42 class PLATFORM_EXPORT ICOImageDecoder final : public ImageDecoder { |
44 public: | 43 public: |
45 ICOImageDecoder(AlphaOption, GammaAndColorProfileOption, size_t maxDecodedBy
tes); | 44 ICOImageDecoder(AlphaOption, GammaAndColorProfileOption, size_t maxDecodedBy
tes); |
46 ~ICOImageDecoder() override; | 45 ~ICOImageDecoder() override; |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 size_t m_decodedOffset; | 152 size_t m_decodedOffset; |
154 | 153 |
155 // Which type of file (ICO/CUR) this is. | 154 // Which type of file (ICO/CUR) this is. |
156 FileType m_fileType; | 155 FileType m_fileType; |
157 | 156 |
158 // The headers for the ICO. | 157 // The headers for the ICO. |
159 typedef Vector<IconDirectoryEntry> IconDirectoryEntries; | 158 typedef Vector<IconDirectoryEntry> IconDirectoryEntries; |
160 IconDirectoryEntries m_dirEntries; | 159 IconDirectoryEntries m_dirEntries; |
161 | 160 |
162 // The image decoders for the various frames. | 161 // The image decoders for the various frames. |
163 typedef Vector<std::unique_ptr<BMPImageReader>> BMPReaders; | 162 typedef Vector<OwnPtr<BMPImageReader>> BMPReaders; |
164 BMPReaders m_bmpReaders; | 163 BMPReaders m_bmpReaders; |
165 typedef Vector<std::unique_ptr<PNGImageDecoder>> PNGDecoders; | 164 typedef Vector<OwnPtr<PNGImageDecoder>> PNGDecoders; |
166 PNGDecoders m_pngDecoders; | 165 PNGDecoders m_pngDecoders; |
167 | 166 |
168 // Valid only while a BMPImageReader is decoding, this holds the size | 167 // Valid only while a BMPImageReader is decoding, this holds the size |
169 // for the particular entry being decoded. | 168 // for the particular entry being decoded. |
170 IntSize m_frameSize; | 169 IntSize m_frameSize; |
171 }; | 170 }; |
172 | 171 |
173 } // namespace blink | 172 } // namespace blink |
174 | 173 |
175 #endif | 174 #endif |
OLD | NEW |