Helper to assist in collecting image paths from |dir| specified through a command line flag.
Populates |output|, an array of strings with paths to images to test.
11 {
13
14 static const char* const exts[] = {
15 "bmp",
16 "gif",
17 "jpg",
18 "jpeg",
19 "png",
20 "webp",
21 "ktx",
22 "astc",
23 "wbmp",
24 "ico",
25#if !defined(SK_BUILD_FOR_WIN)
26 "BMP",
27 "GIF",
28 "JPG",
29 "JPEG",
30 "PNG",
31 "WEBP",
32 "KTX",
33 "ASTC",
34 "WBMP",
35 "ICO",
36#endif
37#ifdef SK_HAS_HEIF_LIBRARY
38 "heic",
39#if !defined(SK_BUILD_FOR_WIN)
40 "HEIC",
41#endif
42#endif
43#ifdef SK_CODEC_DECODES_RAW
44 "arw",
45 "cr2",
46 "dng",
47 "nef",
48 "nrw",
49 "orf",
50 "raf",
51 "rw2",
52 "pef",
53 "srw",
54#if !defined(SK_BUILD_FOR_WIN)
55 "ARW",
56 "CR2",
57 "DNG",
58 "NEF",
59 "NRW",
60 "ORF",
61 "RAF",
62 "RW2",
63 "PEF",
64 "SRW",
65#endif
66#endif
67 };
68
69 for (
int i = 0; i <
images.size(); ++i) {
73 return false;
74 }
75
77
78 bool foundAnImage = false;
79 for (const char* ext : exts) {
82 while (it.next(&file)) {
83 foundAnImage = true;
85 }
86 }
87 if (!foundAnImage) {
89 return false;
90 }
91 } else {
92
94 }
95 }
96 return true;
97}
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
bool sk_exists(const char *path, SkFILE_Flags=(SkFILE_Flags) 0)
bool sk_isdir(const char *path)
static SkString Join(const char *rootPath, const char *relativePath)
FlutterSemanticsFlag flag
std::array< MockImage, 3 > images