| 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 28 matching lines...) Expand all Loading... |
| 39 class PNGImageDecoder; | 39 class PNGImageDecoder; |
| 40 | 40 |
| 41 // This class decodes the ICO and CUR image formats. | 41 // This class decodes the ICO and CUR image formats. |
| 42 class PLATFORM_EXPORT ICOImageDecoder final : public ImageDecoder { | 42 class PLATFORM_EXPORT ICOImageDecoder final : public ImageDecoder { |
| 43 public: | 43 public: |
| 44 ICOImageDecoder(AlphaOption, GammaAndColorProfileOption, size_t maxDecodedBy
tes); | 44 ICOImageDecoder(AlphaOption, GammaAndColorProfileOption, size_t maxDecodedBy
tes); |
| 45 ~ICOImageDecoder() override; | 45 ~ICOImageDecoder() override; |
| 46 | 46 |
| 47 // ImageDecoder: | 47 // ImageDecoder: |
| 48 String filenameExtension() const override { return "ico"; } | 48 String filenameExtension() const override { return "ico"; } |
| 49 void onSetData(SharedBuffer*) override; | 49 void onSetData(SegmentReader*) override; |
| 50 IntSize size() const override; | 50 IntSize size() const override; |
| 51 IntSize frameSizeAtIndex(size_t) const override; | 51 IntSize frameSizeAtIndex(size_t) const override; |
| 52 bool setSize(unsigned width, unsigned height) override; | 52 bool setSize(unsigned width, unsigned height) override; |
| 53 // CAUTION: setFailed() deletes all readers and decoders. Be careful to | 53 // CAUTION: setFailed() deletes all readers and decoders. Be careful to |
| 54 // avoid accessing deleted memory, especially when calling this from | 54 // avoid accessing deleted memory, especially when calling this from |
| 55 // inside BMPImageReader! | 55 // inside BMPImageReader! |
| 56 bool setFailed() override; | 56 bool setFailed() override; |
| 57 bool hotSpot(IntPoint&) const override; | 57 bool hotSpot(IntPoint&) const override; |
| 58 | 58 |
| 59 private: | 59 private: |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 PNGDecoders m_pngDecoders; | 163 PNGDecoders m_pngDecoders; |
| 164 | 164 |
| 165 // Valid only while a BMPImageReader is decoding, this holds the size | 165 // Valid only while a BMPImageReader is decoding, this holds the size |
| 166 // for the particular entry being decoded. | 166 // for the particular entry being decoded. |
| 167 IntSize m_frameSize; | 167 IntSize m_frameSize; |
| 168 }; | 168 }; |
| 169 | 169 |
| 170 } // namespace blink | 170 } // namespace blink |
| 171 | 171 |
| 172 #endif | 172 #endif |
| OLD | NEW |