| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 class PLATFORM_EXPORT WEBPImageDecoder final : public ImageDecoder { | 40 class PLATFORM_EXPORT WEBPImageDecoder final : public ImageDecoder { |
| 41 WTF_MAKE_NONCOPYABLE(WEBPImageDecoder); | 41 WTF_MAKE_NONCOPYABLE(WEBPImageDecoder); |
| 42 public: | 42 public: |
| 43 WEBPImageDecoder(AlphaOption, GammaAndColorProfileOption, size_t maxDecodedB
ytes); | 43 WEBPImageDecoder(AlphaOption, GammaAndColorProfileOption, size_t maxDecodedB
ytes); |
| 44 ~WEBPImageDecoder() override; | 44 ~WEBPImageDecoder() override; |
| 45 | 45 |
| 46 // ImageDecoder: | 46 // ImageDecoder: |
| 47 String filenameExtension() const override { return "webp"; } | 47 String filenameExtension() const override { return "webp"; } |
| 48 void onSetData(SegmentReader* data) override; | 48 void onSetData(SegmentReader* data) override; |
| 49 int repetitionCount() const override; | 49 int repetitionCount() const override; |
| 50 bool frameIsCompleteAtIndex(size_t) const override; | 50 bool frameIsFullyReceivedAtIndex(size_t) const override; |
| 51 float frameDurationAtIndex(size_t) const override; | 51 float frameDurationAtIndex(size_t) const override; |
| 52 size_t clearCacheExceptFrame(size_t) override; | 52 size_t clearCacheExceptFrame(size_t) override; |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 // ImageDecoder: | 55 // ImageDecoder: |
| 56 virtual void decodeSize() { updateDemuxer(); } | 56 virtual void decodeSize() { updateDemuxer(); } |
| 57 size_t decodeFrameCount() override; | 57 size_t decodeFrameCount() override; |
| 58 void initializeNewFrame(size_t) override; | 58 void initializeNewFrame(size_t) override; |
| 59 void decode(size_t) override; | 59 void decode(size_t) override; |
| 60 | 60 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 86 void clear(); | 86 void clear(); |
| 87 void clearDecoder(); | 87 void clearDecoder(); |
| 88 | 88 |
| 89 // FIXME: Update libwebp's API so it does not require copying the data on ea
ch update. | 89 // FIXME: Update libwebp's API so it does not require copying the data on ea
ch update. |
| 90 RefPtr<SkData> m_consolidatedData; | 90 RefPtr<SkData> m_consolidatedData; |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 } // namespace blink | 93 } // namespace blink |
| 94 | 94 |
| 95 #endif | 95 #endif |
| OLD | NEW |