blob: 1bd45173376aaea23e3a18ba5642a9c1d7020329 [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);
msarett69deca82016-04-29 09:38:40 -070019DECLARE_string(colorImages);
msarettdb197a52016-06-21 09:44:29 -070020DECLARE_bool(simpleCodec);
caryclark17f0b6d2014-07-22 10:15:34 -070021DECLARE_string(match);
22DECLARE_bool(quiet);
joshualitt5f5a8d72015-02-25 14:09:45 -080023DECLARE_bool(preAbandonGpuContext);
bsalomon2354f842014-07-28 13:48:36 -070024DECLARE_bool(abandonGpuContext);
bsalomon6e2aad42016-04-01 11:54:31 -070025DECLARE_bool(releaseAndAbandonGpuContext);
mtklein92007582014-08-01 07:46:52 -070026DECLARE_string(skps);
Robert Phillips33f02ed2018-03-27 08:06:57 -040027DECLARE_int32(skpViewportSize);
Ben Wagner483c7722018-02-20 17:06:07 -050028DECLARE_string(jpgs);
Eric Boren8c172ba2018-07-19 13:27:49 -040029DECLARE_string(lotties);
fmalita95573e42016-09-14 09:05:43 -070030DECLARE_string(svgs);
Ruiqi Maof5101492018-06-29 14:32:21 -040031DECLARE_string(nimas);
Ben Wagner483c7722018-02-20 17:06:07 -050032DECLARE_bool(nativeFonts);
caryclark17f0b6d2014-07-22 10:15:34 -070033DECLARE_int32(threads);
34DECLARE_string(resourcePath);
35DECLARE_bool(verbose);
36DECLARE_bool(veryVerbose);
mtkleinb5110422014-08-07 15:20:02 -070037DECLARE_string(writePath);
benjaminwagner8d61f0d2016-01-25 13:02:40 -080038DECLARE_bool(pre_log);
liyuqian38911a72016-10-04 11:23:22 -070039DECLARE_bool(analyticAA);
Yuqian Li550148b2017-01-13 10:13:13 -050040DECLARE_bool(forceAnalyticAA);
Yuqian Lidf60e362017-07-25 11:26:31 -040041DECLARE_bool(deltaAA);
42DECLARE_bool(forceDeltaAA);
mtkleinea65bfa2014-09-09 07:59:46 -070043DECLARE_string(key);
44DECLARE_string(properties);
Yuqian Lib8b62532018-02-23 14:13:36 +080045DECLARE_int32(backendTiles);
46DECLARE_int32(backendThreads)
mtkleinea65bfa2014-09-09 07:59:46 -070047
scroggo86737142016-02-03 12:19:11 -080048/**
msarett69deca82016-04-29 09:38:40 -070049 * Helper to assist in collecting image paths from |dir| specified through a command line flag.
scroggo86737142016-02-03 12:19:11 -080050 *
msarett69deca82016-04-29 09:38:40 -070051 * Populates |output|, an array of strings with paths to images to test.
scroggo86737142016-02-03 12:19:11 -080052 *
msarett69deca82016-04-29 09:38:40 -070053 * Returns true if each argument to the images flag is meaningful:
scroggo86737142016-02-03 12:19:11 -080054 * - If the file/directory does not exist, return false.
msarett69deca82016-04-29 09:38:40 -070055 * - If |dir| does not have any supported images (based on file type), return false.
56 * - If |dir| is a single file, assume the user is deliberately testing this image,
57 * regardless of file type.
scroggo86737142016-02-03 12:19:11 -080058 */
msarett69deca82016-04-29 09:38:40 -070059bool CollectImages(SkCommandLineFlags::StringArray dir, SkTArray<SkString>* output);
scroggo86737142016-02-03 12:19:11 -080060
caryclark17f0b6d2014-07-22 10:15:34 -070061#endif