caryclark | 17f0b6d | 2014-07-22 10:15:34 -0700 | [diff] [blame] | 1 | /* |
| 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 | |
| 11 | #include "SkCommandLineFlags.h" |
scroggo | 8673714 | 2016-02-03 12:19:11 -0800 | [diff] [blame^] | 12 | #include "SkTArray.h" |
| 13 | #include "SkString.h" |
caryclark | 17f0b6d | 2014-07-22 10:15:34 -0700 | [diff] [blame] | 14 | |
caryclark | 17f0b6d | 2014-07-22 10:15:34 -0700 | [diff] [blame] | 15 | DECLARE_bool(cpu); |
| 16 | DECLARE_bool(dryRun); |
| 17 | DECLARE_bool(gpu); |
msarett | 95f192d | 2015-02-13 09:05:41 -0800 | [diff] [blame] | 18 | DECLARE_string(images); |
caryclark | 17f0b6d | 2014-07-22 10:15:34 -0700 | [diff] [blame] | 19 | DECLARE_string(match); |
| 20 | DECLARE_bool(quiet); |
| 21 | DECLARE_bool(resetGpuContext); |
joshualitt | 5f5a8d7 | 2015-02-25 14:09:45 -0800 | [diff] [blame] | 22 | DECLARE_bool(preAbandonGpuContext); |
bsalomon | 2354f84 | 2014-07-28 13:48:36 -0700 | [diff] [blame] | 23 | DECLARE_bool(abandonGpuContext); |
mtklein | 9200758 | 2014-08-01 07:46:52 -0700 | [diff] [blame] | 24 | DECLARE_string(skps); |
caryclark | 17f0b6d | 2014-07-22 10:15:34 -0700 | [diff] [blame] | 25 | DECLARE_int32(threads); |
| 26 | DECLARE_string(resourcePath); |
| 27 | DECLARE_bool(verbose); |
| 28 | DECLARE_bool(veryVerbose); |
mtklein | b511042 | 2014-08-07 15:20:02 -0700 | [diff] [blame] | 29 | DECLARE_string(writePath); |
benjaminwagner | 8d61f0d | 2016-01-25 13:02:40 -0800 | [diff] [blame] | 30 | DECLARE_bool(pre_log); |
caryclark | 17f0b6d | 2014-07-22 10:15:34 -0700 | [diff] [blame] | 31 | |
mtklein | ea65bfa | 2014-09-09 07:59:46 -0700 | [diff] [blame] | 32 | DECLARE_string(key); |
| 33 | DECLARE_string(properties); |
| 34 | |
scroggo | 8673714 | 2016-02-03 12:19:11 -0800 | [diff] [blame^] | 35 | /** |
| 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 | */ |
| 47 | bool CollectImages(SkTArray<SkString>*); |
| 48 | |
caryclark | 17f0b6d | 2014-07-22 10:15:34 -0700 | [diff] [blame] | 49 | #endif |