| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "wtf/Vector.h" | 5 #include "wtf/Vector.h" |
| 6 #include <memory> | 6 #include <memory> |
| 7 | 7 |
| 8 class SkBitmap; | 8 class SkBitmap; |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 class ImageDecoder; | 11 class ImageDecoder; |
| 12 class SharedBuffer; | 12 class SharedBuffer; |
| 13 | 13 |
| 14 const char decodersTestingDir[] = "Source/platform/image-decoders/testing"; | 14 const char decodersTestingDir[] = "Source/platform/image-decoders/testing"; |
| 15 | 15 |
| 16 using DecoderCreator = std::unique_ptr<ImageDecoder> (*)(); | 16 using DecoderCreator = std::unique_ptr<ImageDecoder> (*)(); |
| 17 PassRefPtr<SharedBuffer> readFile(const char* fileName); | 17 PassRefPtr<SharedBuffer> readFile(const char* fileName); |
| 18 PassRefPtr<SharedBuffer> readFile(const char* dir, const char* fileName); | 18 PassRefPtr<SharedBuffer> readFile(const char* dir, const char* fileName); |
| 19 unsigned hashBitmap(const SkBitmap&); | 19 unsigned hashBitmap(const SkBitmap&); |
| 20 void createDecodingBaseline(DecoderCreator, | 20 void createDecodingBaseline(DecoderCreator, |
| 21 SharedBuffer*, | 21 SharedBuffer*, |
| 22 Vector<unsigned>* baselineHashes); | 22 Vector<unsigned>* baselineHashes); |
| 23 void testByteByByteDecode(DecoderCreator createDecoder, | 23 void testByteByByteDecode(DecoderCreator createDecoder, |
| 24 const char* file, | 24 const char* file, |
| 25 size_t expectedFrameCount, | 25 size_t expectedFrameCount, |
| 26 int expectedRepetitionCount); | 26 int expectedRepetitionCount); |
| 27 void testMergeBuffer(DecoderCreator createDecoder, const char* file); | 27 void testMergeBuffer(DecoderCreator createDecoder, const char* file); |
| 28 void testRandomFrameDecode(DecoderCreator, |
| 29 const char* file, |
| 30 size_t skippingStep = 5); |
| 31 void testRandomDecodeAfterClearFrameBufferCache(DecoderCreator, |
| 32 const char* file, |
| 33 size_t skippingStep = 5); |
| 34 void testDecodeAfterReallocatingData(DecoderCreator, const char* file); |
| 35 void testByteByByteSizeAvailable(DecoderCreator, |
| 36 const char* file, |
| 37 size_t frameOffset, |
| 38 bool hasColorSpace, |
| 39 int expectedRepetitionCount); |
| 40 void testProgressiveDecoding(DecoderCreator, |
| 41 const char* file, |
| 42 size_t incrementi = 1); |
| 28 } // namespace blink | 43 } // namespace blink |
| OLD | NEW |