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 const char* concatDirAndFile(const char *dir, const char *file); | |
scroggo_chromium
2016/11/09 14:38:37
nit, here and elsewhere - * goes next to the type:
joostouwerling
2016/11/10 17:15:13
Done.
| |
17 PassRefPtr<SharedBuffer> readFile(const char* fileName); | 18 PassRefPtr<SharedBuffer> readFile(const char* fileName); |
18 PassRefPtr<SharedBuffer> readFile(const char* dir, const char* fileName); | 19 PassRefPtr<SharedBuffer> readFile(const char* dir, const char* fileName); |
19 unsigned hashBitmap(const SkBitmap&); | 20 unsigned hashBitmap(const SkBitmap&); |
20 void createDecodingBaseline(DecoderCreator, | 21 void createDecodingBaseline(DecoderCreator, |
21 SharedBuffer*, | 22 SharedBuffer*, |
22 Vector<unsigned>* baselineHashes); | 23 Vector<unsigned>* baselineHashes); |
23 void testByteByByteDecode(DecoderCreator createDecoder, | 24 void testByteByByteDecode(DecoderCreator createDecoder, |
24 const char* file, | 25 const char* file, |
25 size_t expectedFrameCount, | 26 size_t expectedFrameCount, |
26 int expectedRepetitionCount); | 27 int expectedRepetitionCount); |
27 void testMergeBuffer(DecoderCreator createDecoder, const char* file); | 28 void testMergeBuffer(DecoderCreator createDecoder, const char* file); |
29 void testRandomFrameDecode(DecoderCreator, 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, const char* file, | |
36 size_t frameOffset, bool hasColorSpace, | |
37 int expectedRepetitionCount); | |
38 void testProgressiveDecoding(DecoderCreator, const char *file, | |
39 size_t incrementi = 1); | |
28 } // namespace blink | 40 } // namespace blink |
OLD | NEW |