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 26 matching lines...) Expand all Loading... |
37 | 37 |
38 namespace blink { | 38 namespace blink { |
39 | 39 |
40 class PNGImageDecoder; | 40 class PNGImageDecoder; |
41 | 41 |
42 // This class decodes the ICO and CUR image formats. | 42 // This class decodes the ICO and CUR image formats. |
43 class PLATFORM_EXPORT ICOImageDecoder final : public ImageDecoder { | 43 class PLATFORM_EXPORT ICOImageDecoder final : public ImageDecoder { |
44 WTF_MAKE_NONCOPYABLE(ICOImageDecoder); | 44 WTF_MAKE_NONCOPYABLE(ICOImageDecoder); |
45 | 45 |
46 public: | 46 public: |
47 ICOImageDecoder(AlphaOption, | 47 ICOImageDecoder(AlphaOption, ColorSpaceOption, size_t maxDecodedBytes); |
48 GammaAndColorProfileOption, | |
49 size_t maxDecodedBytes); | |
50 ~ICOImageDecoder() override; | 48 ~ICOImageDecoder() override; |
51 | 49 |
52 // ImageDecoder: | 50 // ImageDecoder: |
53 String filenameExtension() const override { return "ico"; } | 51 String filenameExtension() const override { return "ico"; } |
54 void onSetData(SegmentReader*) override; | 52 void onSetData(SegmentReader*) override; |
55 IntSize size() const override; | 53 IntSize size() const override; |
56 IntSize frameSizeAtIndex(size_t) const override; | 54 IntSize frameSizeAtIndex(size_t) const override; |
57 bool setSize(unsigned width, unsigned height) override; | 55 bool setSize(unsigned width, unsigned height) override; |
58 bool frameIsCompleteAtIndex(size_t) const override; | 56 bool frameIsCompleteAtIndex(size_t) const override; |
59 // CAUTION: setFailed() deletes all readers and decoders. Be careful to | 57 // CAUTION: setFailed() deletes all readers and decoders. Be careful to |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 typedef Vector<std::unique_ptr<BMPImageReader>> BMPReaders; | 171 typedef Vector<std::unique_ptr<BMPImageReader>> BMPReaders; |
174 BMPReaders m_bmpReaders; | 172 BMPReaders m_bmpReaders; |
175 typedef Vector<std::unique_ptr<PNGImageDecoder>> PNGDecoders; | 173 typedef Vector<std::unique_ptr<PNGImageDecoder>> PNGDecoders; |
176 PNGDecoders m_pngDecoders; | 174 PNGDecoders m_pngDecoders; |
177 | 175 |
178 // Valid only while a BMPImageReader is decoding, this holds the size | 176 // Valid only while a BMPImageReader is decoding, this holds the size |
179 // for the particular entry being decoded. | 177 // for the particular entry being decoded. |
180 IntSize m_frameSize; | 178 IntSize m_frameSize; |
181 | 179 |
182 // Used to pass on to an internally created PNG decoder. | 180 // Used to pass on to an internally created PNG decoder. |
183 const GammaAndColorProfileOption m_gammaAndColorProfileOption; | 181 const ColorSpaceOption m_colorSpaceOption; |
184 }; | 182 }; |
185 | 183 |
186 } // namespace blink | 184 } // namespace blink |
187 | 185 |
188 #endif | 186 #endif |
OLD | NEW |