2014-07-22 17:15:34 +00:00
|
|
|
/*
|
|
|
|
* 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
|
|
|
|
|
2016-02-17 21:13:44 +00:00
|
|
|
#include "../private/SkTArray.h"
|
2019-03-20 15:50:33 +00:00
|
|
|
#include "CommandLineFlags.h"
|
2016-02-03 20:19:11 +00:00
|
|
|
#include "SkString.h"
|
2014-07-22 17:15:34 +00:00
|
|
|
|
|
|
|
DECLARE_bool(cpu);
|
|
|
|
DECLARE_bool(dryRun);
|
|
|
|
DECLARE_bool(gpu);
|
2015-02-13 17:05:41 +00:00
|
|
|
DECLARE_string(images);
|
2016-06-21 16:44:29 +00:00
|
|
|
DECLARE_bool(simpleCodec);
|
2014-07-22 17:15:34 +00:00
|
|
|
DECLARE_string(match);
|
|
|
|
DECLARE_bool(quiet);
|
2014-08-01 14:46:52 +00:00
|
|
|
DECLARE_string(skps);
|
2018-07-19 17:27:49 +00:00
|
|
|
DECLARE_string(lotties);
|
2016-09-14 16:05:43 +00:00
|
|
|
DECLARE_string(svgs);
|
2018-02-20 22:06:07 +00:00
|
|
|
DECLARE_bool(nativeFonts);
|
2019-03-21 16:42:21 +00:00
|
|
|
DECLARE_int(threads);
|
2014-07-22 17:15:34 +00:00
|
|
|
DECLARE_string(resourcePath);
|
|
|
|
DECLARE_bool(verbose);
|
|
|
|
DECLARE_bool(veryVerbose);
|
2014-08-07 22:20:02 +00:00
|
|
|
DECLARE_string(writePath);
|
2016-10-04 18:23:22 +00:00
|
|
|
DECLARE_bool(analyticAA);
|
2017-01-13 15:13:13 +00:00
|
|
|
DECLARE_bool(forceAnalyticAA);
|
Update DM JSON format.
Ex. dm --match patch -w bad --key arch x86 gpu nvidia model z620 --properties git_hash abcd build_number 20 ->
{
"build_number" : "20",
"git_hash" : "abcd",
"key" : {
"arch" : "x86",
"gpu" : "nvidia",
"model" : "z620"
},
"results" : [
{
"key" : {
"config" : "565",
"name" : "ninepatch-stretch"
},
"md5" : "f78cfafcbabaf815f3dfcf61fb59acc7",
"options" : {
"source_type" : "GM"
}
},
{
"key" : {
"config" : "8888",
"name" : "ninepatch-stretch"
},
"md5" : "3e8a42f35a1e76f00caa191e6310d789",
"options" : {
"source_type" : "GM"
}
},
...
This breaks -r, but that's okay. Going to follow up this CL with one that removes that entirely.
BUG=skia:
R=stephana@google.com, jcgregorio@google.com, mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/551873003
2014-09-09 14:59:46 +00:00
|
|
|
DECLARE_string(key);
|
|
|
|
DECLARE_string(properties);
|
|
|
|
|
2016-02-03 20:19:11 +00:00
|
|
|
/**
|
2019-03-20 15:50:33 +00:00
|
|
|
* Helper to assist in collecting image paths from |dir| specified through a command line
|
|
|
|
* flag.
|
2016-02-03 20:19:11 +00:00
|
|
|
*
|
2016-04-29 16:38:40 +00:00
|
|
|
* Populates |output|, an array of strings with paths to images to test.
|
2016-02-03 20:19:11 +00:00
|
|
|
*
|
2016-04-29 16:38:40 +00:00
|
|
|
* Returns true if each argument to the images flag is meaningful:
|
2016-02-03 20:19:11 +00:00
|
|
|
* - If the file/directory does not exist, return false.
|
2016-04-29 16:38:40 +00:00
|
|
|
* - 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.
|
2016-02-03 20:19:11 +00:00
|
|
|
*/
|
2019-03-20 15:50:33 +00:00
|
|
|
bool CollectImages(CommandLineFlags::StringArray dir, SkTArray<SkString>* output);
|
2016-02-03 20:19:11 +00:00
|
|
|
|
2014-07-22 17:15:34 +00:00
|
|
|
#endif
|