aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/flags/SkCommonFlags.h
blob: 1bd45173376aaea23e3a18ba5642a9c1d7020329 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
 * Copyright 2014 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#ifndef SK_COMMON_FLAGS_H
#define SK_COMMON_FLAGS_H

#include "../private/SkTArray.h"
#include "SkCommandLineFlags.h"
#include "SkString.h"

DECLARE_bool(cpu);
DECLARE_bool(dryRun);
DECLARE_bool(gpu);
DECLARE_string(images);
DECLARE_string(colorImages);
DECLARE_bool(simpleCodec);
DECLARE_string(match);
DECLARE_bool(quiet);
DECLARE_bool(preAbandonGpuContext);
DECLARE_bool(abandonGpuContext);
DECLARE_bool(releaseAndAbandonGpuContext);
DECLARE_string(skps);
DECLARE_int32(skpViewportSize);
DECLARE_string(jpgs);
DECLARE_string(lotties);
DECLARE_string(svgs);
DECLARE_string(nimas);
DECLARE_bool(nativeFonts);
DECLARE_int32(threads);
DECLARE_string(resourcePath);
DECLARE_bool(verbose);
DECLARE_bool(veryVerbose);
DECLARE_string(writePath);
DECLARE_bool(pre_log);
DECLARE_bool(analyticAA);
DECLARE_bool(forceAnalyticAA);
DECLARE_bool(deltaAA);
DECLARE_bool(forceDeltaAA);
DECLARE_string(key);
DECLARE_string(properties);
DECLARE_int32(backendTiles);
DECLARE_int32(backendThreads)

/**
 *  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.
 *
 *  Returns true if each argument to the images flag is meaningful:
 *  - If the file/directory does not exist, return false.
 *  - If |dir| does not have any supported images (based on file type), return false.
 *  - If |dir| is a single file, assume the user is deliberately testing this image,
 *    regardless of file type.
 */
bool CollectImages(SkCommandLineFlags::StringArray dir, SkTArray<SkString>* output);

#endif