| 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 23 matching lines...) Expand all Loading... |
| 34 #include "webp/decode.h" | 34 #include "webp/decode.h" |
| 35 #include "webp/demux.h" | 35 #include "webp/demux.h" |
| 36 #include "wtf/RefPtr.h" | 36 #include "wtf/RefPtr.h" |
| 37 | 37 |
| 38 namespace blink { | 38 namespace blink { |
| 39 | 39 |
| 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 | 42 |
| 43 public: | 43 public: |
| 44 WEBPImageDecoder(AlphaOption, | 44 WEBPImageDecoder(AlphaOption, ColorSpaceOption, size_t maxDecodedBytes); |
| 45 GammaAndColorProfileOption, | |
| 46 size_t maxDecodedBytes); | |
| 47 ~WEBPImageDecoder() override; | 45 ~WEBPImageDecoder() override; |
| 48 | 46 |
| 49 // ImageDecoder: | 47 // ImageDecoder: |
| 50 String filenameExtension() const override { return "webp"; } | 48 String filenameExtension() const override { return "webp"; } |
| 51 void onSetData(SegmentReader* data) override; | 49 void onSetData(SegmentReader* data) override; |
| 52 int repetitionCount() const override; | 50 int repetitionCount() const override; |
| 53 bool frameIsCompleteAtIndex(size_t) const override; | 51 bool frameIsCompleteAtIndex(size_t) const override; |
| 54 float frameDurationAtIndex(size_t) const override; | 52 float frameDurationAtIndex(size_t) const override; |
| 55 size_t clearCacheExceptFrame(size_t) override; | 53 size_t clearCacheExceptFrame(size_t) override; |
| 56 | 54 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 void clearDecoder(); | 87 void clearDecoder(); |
| 90 | 88 |
| 91 // FIXME: Update libwebp's API so it does not require copying the data on each | 89 // FIXME: Update libwebp's API so it does not require copying the data on each |
| 92 // update. | 90 // update. |
| 93 sk_sp<SkData> m_consolidatedData; | 91 sk_sp<SkData> m_consolidatedData; |
| 94 }; | 92 }; |
| 95 | 93 |
| 96 } // namespace blink | 94 } // namespace blink |
| 97 | 95 |
| 98 #endif | 96 #endif |
| OLD | NEW |