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"
|
2014-07-22 17:15:34 +00:00
|
|
|
#include "SkCommandLineFlags.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-04-29 16:38:40 +00:00
|
|
|
DECLARE_string(colorImages);
|
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);
|
2015-02-25 22:09:45 +00:00
|
|
|
DECLARE_bool(preAbandonGpuContext);
|
2014-07-28 20:48:36 +00:00
|
|
|
DECLARE_bool(abandonGpuContext);
|
2016-04-01 18:54:31 +00:00
|
|
|
DECLARE_bool(releaseAndAbandonGpuContext);
|
2014-08-01 14:46:52 +00:00
|
|
|
DECLARE_string(skps);
|
2018-03-27 12:06:57 +00:00
|
|
|
DECLARE_int32(skpViewportSize);
|
2018-02-20 22:06:07 +00:00
|
|
|
DECLARE_string(jpgs);
|
2018-07-19 17:27:49 +00:00
|
|
|
DECLARE_string(lotties);
|
2016-09-14 16:05:43 +00:00
|
|
|
DECLARE_string(svgs);
|
2018-06-29 18:32:21 +00:00
|
|
|
DECLARE_string(nimas);
|
2018-02-20 22:06:07 +00:00
|
|
|
DECLARE_bool(nativeFonts);
|
2014-07-22 17:15:34 +00:00
|
|
|
DECLARE_int32(threads);
|
|
|
|
DECLARE_string(resourcePath);
|
|
|
|
DECLARE_bool(verbose);
|
|
|
|
DECLARE_bool(veryVerbose);
|
2014-08-07 22:20:02 +00:00
|
|
|
DECLARE_string(writePath);
|
2016-01-25 21:02:40 +00:00
|
|
|
DECLARE_bool(pre_log);
|
2016-10-04 18:23:22 +00:00
|
|
|
DECLARE_bool(analyticAA);
|
2017-01-13 15:13:13 +00:00
|
|
|
DECLARE_bool(forceAnalyticAA);
|
2017-07-25 15:26:31 +00:00
|
|
|
DECLARE_bool(deltaAA);
|
|
|
|
DECLARE_bool(forceDeltaAA);
|
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);
|
2018-02-23 06:13:36 +00:00
|
|
|
DECLARE_int32(backendTiles);
|
|
|
|
DECLARE_int32(backendThreads)
|
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
|
|
|
|
2016-02-03 20:19:11 +00:00
|
|
|
/**
|
2016-04-29 16:38:40 +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
|
|
|
*/
|
2016-04-29 16:38:40 +00:00
|
|
|
bool CollectImages(SkCommandLineFlags::StringArray dir, SkTArray<SkString>* output);
|
2016-02-03 20:19:11 +00:00
|
|
|
|
2014-07-22 17:15:34 +00:00
|
|
|
#endif
|