Index: third_party/WebKit/Source/platform/image-decoders/ImageDecoderTestHelpers.h |
diff --git a/third_party/WebKit/Source/platform/image-decoders/ImageDecoderTestHelpers.h b/third_party/WebKit/Source/platform/image-decoders/ImageDecoderTestHelpers.h |
index d860e5087f22439af91d4acd8e156994e60371d3..12974157c9462fa2041a9b438d15a89cd11bc20b 100644 |
--- a/third_party/WebKit/Source/platform/image-decoders/ImageDecoderTestHelpers.h |
+++ b/third_party/WebKit/Source/platform/image-decoders/ImageDecoderTestHelpers.h |
@@ -20,9 +20,67 @@ unsigned hashBitmap(const SkBitmap&); |
void createDecodingBaseline(DecoderCreator, |
SharedBuffer*, |
Vector<unsigned>* baselineHashes); |
+ |
+void testByteByByteDecode(DecoderCreator createDecoder, |
+ const char* file, |
+ size_t expectedFrameCount, |
+ int expectedRepetitionCount); |
void testByteByByteDecode(DecoderCreator createDecoder, |
+ const char* dir, |
const char* file, |
size_t expectedFrameCount, |
int expectedRepetitionCount); |
+ |
void testMergeBuffer(DecoderCreator createDecoder, const char* file); |
+void testMergeBuffer(DecoderCreator createDecoder, |
+ const char* dir, |
+ const char* file); |
+ |
+// |skippingStep| is used to randomize the decoding order. For images with |
+// a small number of frames (e.g. < 10), this value should be smaller, on the |
+// order of (number of frames) / 2. |
+void testRandomFrameDecode(DecoderCreator, |
+ const char* file, |
+ size_t skippingStep = 5); |
+void testRandomFrameDecode(DecoderCreator, |
+ const char* dir, |
+ const char* file, |
+ size_t skippingStep = 5); |
+ |
+// |skippingStep| is used to randomize the decoding order. For images with |
+// a small number of frames (e.g. < 10), this value should be smaller, on the |
+// order of (number of frames) / 2. |
+void testRandomDecodeAfterClearFrameBufferCache(DecoderCreator, |
+ const char* file, |
+ size_t skippingStep = 5); |
+void testRandomDecodeAfterClearFrameBufferCache(DecoderCreator, |
+ const char* dir, |
+ const char* file, |
+ size_t skippingStep = 5); |
+ |
+void testDecodeAfterReallocatingData(DecoderCreator, const char* file); |
+void testDecodeAfterReallocatingData(DecoderCreator, |
+ const char* dir, |
+ const char* file); |
+void testByteByByteSizeAvailable(DecoderCreator, |
+ const char* file, |
+ size_t frameOffset, |
+ bool hasColorSpace, |
+ int expectedRepetitionCount); |
+void testByteByByteSizeAvailable(DecoderCreator, |
+ const char* dir, |
+ const char* file, |
+ size_t frameOffset, |
+ bool hasColorSpace, |
+ int expectedRepetitionCount); |
+ |
+// Data is provided in chunks of length |increment| to the decoder. This value |
+// can be increased to reduce processing time. |
+void testProgressiveDecoding(DecoderCreator, |
+ const char* file, |
+ size_t increment = 1); |
+void testProgressiveDecoding(DecoderCreator, |
+ const char* dir, |
+ const char* file, |
+ size_t increment = 1); |
} // namespace blink |