Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Unified Diff: third_party/WebKit/Source/platform/image-decoders/ImageDecoderTestHelpers.h

Issue 2490473005: Pull up equivalent image decoding tests (Closed)
Patch Set: Removed unnecessary header Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/image-decoders/ImageDecoderTestHelpers.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/image-decoders/ImageDecoderTestHelpers.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698