| Index: third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
|
| diff --git a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
|
| index 2ebd7797caf99844abc34018d95e42f885f8b453..fd0fbd7d66d8726aa59f18658ff558163947d22e 100644
|
| --- a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
|
| +++ b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
|
| @@ -35,6 +35,7 @@
|
| #include "platform/image-decoders/ImageFrame.h"
|
| #include "public/platform/Platform.h"
|
| #include "wtf/Assertions.h"
|
| +#include "wtf/HashSet.h"
|
| #include "wtf/PassOwnPtr.h"
|
| #include "wtf/RefPtr.h"
|
| #include "wtf/Threading.h"
|
| @@ -46,6 +47,7 @@
|
| #endif
|
|
|
| typedef Vector<char> ColorProfile;
|
| +typedef HashSet<size_t, WTF::IntHash<size_t>, WTF::UnsignedWithZeroKeyHashTraits<size_t>> SizeTHashSet;
|
|
|
| namespace blink {
|
|
|
| @@ -334,6 +336,12 @@ protected:
|
| // Decodes the requested frame.
|
| virtual void decode(size_t) = 0;
|
|
|
| + // Clears decoded pixel data from all frames except the provided frames.
|
| + // Callers may pass WTF::kNotFound to clear all frames.
|
| + // Note: If |m_frameBufferCache| contains only one frame, it won't be cleared.
|
| + // Returns the number of bytes of frame data actually cleared.
|
| + size_t clearCacheExceptFrames(const SizeTHashSet&);
|
| +
|
| RefPtr<SharedBuffer> m_data; // The encoded data.
|
| Vector<ImageFrame, 1> m_frameBufferCache;
|
| bool m_premultiplyAlpha;
|
|
|