blob: c6cbde45ca6270b3b9eed81fc47960c6da4b10dd [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);
bsalomon6e2aad42016-04-01 11:54:31 -070024DECLARE_bool(releaseAndAbandonGpuContext);
mtklein92007582014-08-01 07:46:52 -070025DECLARE_string(skps);
caryclark17f0b6d2014-07-22 10:15:34 -070026DECLARE_int32(threads);
27DECLARE_string(resourcePath);
28DECLARE_bool(verbose);
29DECLARE_bool(veryVerbose);
mtkleinb5110422014-08-07 15:20:02 -070030DECLARE_string(writePath);
benjaminwagner8d61f0d2016-01-25 13:02:40 -080031DECLARE_bool(pre_log);
caryclark17f0b6d2014-07-22 10:15:34 -070032
mtkleinea65bfa2014-09-09 07:59:46 -070033DECLARE_string(key);
34DECLARE_string(properties);
35
scroggo86737142016-02-03 12:19:11 -080036/**
37 * Helper to assist in collecting image paths from --images.
38 *
39 * Populates an array of strings with paths to images to test.
40 *
41 * Returns true if each argument to --images is meaningful:
42 * - If the file/directory does not exist, return false.
43 * - If a directory passed to --images does not have any supported images (based on file
44 * type), return false.
45 * - If a file is passed to --images, assume the user is deliberately testing this image,
46 * regardless of file type.
47 */
48bool CollectImages(SkTArray<SkString>*);
49
caryclark17f0b6d2014-07-22 10:15:34 -070050#endif