blob: 1f7bbffe6e9bb2fee9469436e56c395404d0e471 [file] [log] [blame]
caryclark17f0b6d2014-07-22 10:15:34 -07001/*
2 * Copyright 2014 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef SK_COMMON_FLAGS_H
9#define SK_COMMON_FLAGS_H
10
bungemanbf521ff2016-02-17 13:13:44 -080011#include "../private/SkTArray.h"
caryclark17f0b6d2014-07-22 10:15:34 -070012#include "SkCommandLineFlags.h"
scroggo86737142016-02-03 12:19:11 -080013#include "SkString.h"
caryclark17f0b6d2014-07-22 10:15:34 -070014
caryclark17f0b6d2014-07-22 10:15:34 -070015DECLARE_bool(cpu);
16DECLARE_bool(dryRun);
17DECLARE_bool(gpu);
msarett95f192d2015-02-13 09:05:41 -080018DECLARE_string(images);
caryclark17f0b6d2014-07-22 10:15:34 -070019DECLARE_string(match);
20DECLARE_bool(quiet);
21DECLARE_bool(resetGpuContext);
joshualitt5f5a8d72015-02-25 14:09:45 -080022DECLARE_bool(preAbandonGpuContext);
bsalomon2354f842014-07-28 13:48:36 -070023DECLARE_bool(abandonGpuContext);
mtklein92007582014-08-01 07:46:52 -070024DECLARE_string(skps);
caryclark17f0b6d2014-07-22 10:15:34 -070025DECLARE_int32(threads);
26DECLARE_string(resourcePath);
27DECLARE_bool(verbose);
28DECLARE_bool(veryVerbose);
mtkleinb5110422014-08-07 15:20:02 -070029DECLARE_string(writePath);
benjaminwagner8d61f0d2016-01-25 13:02:40 -080030DECLARE_bool(pre_log);
caryclark17f0b6d2014-07-22 10:15:34 -070031
mtkleinea65bfa2014-09-09 07:59:46 -070032DECLARE_string(key);
33DECLARE_string(properties);
34
scroggo86737142016-02-03 12:19:11 -080035/**
36 * Helper to assist in collecting image paths from --images.
37 *
38 * Populates an array of strings with paths to images to test.
39 *
40 * Returns true if each argument to --images is meaningful:
41 * - If the file/directory does not exist, return false.
42 * - If a directory passed to --images does not have any supported images (based on file
43 * type), return false.
44 * - If a file is passed to --images, assume the user is deliberately testing this image,
45 * regardless of file type.
46 */
47bool CollectImages(SkTArray<SkString>*);
48
caryclark17f0b6d2014-07-22 10:15:34 -070049#endif