aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/flags/SkCommandLineFlags.h
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2015-12-14 05:58:25 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-12-14 05:58:25 -0800
commit4ff653cab2e1e3cfb02c91df9c9013fc927aa1ee (patch)
tree23d046fed15c4bbfcd1039c92fe6612b8c993694 /tools/flags/SkCommandLineFlags.h
parent0b29b728cae6c3f3738b4cda0b786960d05dda2b (diff)
Revert of Add config options to run different GPU APIs to dm and nanobench (patchset #12 id:220001 of https://codereview.chromium.org/1490113005/ )
Reason for revert: speculative revert to see if it unblocks the DEPS roll https://codereview.chromium.org/1529443002 Original issue's description: > Add config options to run different GPU APIs to dm and nanobench > > Add extended config specification form that can be used to run different > gpu backend with different APIs. > > The configs can be specified with the form: > gpu(api=string,dit=bool,nvpr=bool,samples=int) > > This replaces and removes the --gpuAPI flag. > > All existing configs should still work. > > Adds following documentation: > > out/Debug/dm --help config > > Flags: > --config: type: string default: 565 8888 gpu nonrendering > Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4 > nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg > xps or use extended form 'backend(option=value,...)'. > > Extended form: 'backend(option=value,...)' > > Possible backends and options: > > gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend > api type: string default: native. > Select graphics API to use with gpu backend. > Options: > native Use platform default OpenGL or OpenGL ES backend. > gl Use OpenGL. > gles Use OpenGL ES. > debug Use debug OpenGL. > null Use null OpenGL. > dit type: bool default: false. > Use device independent text. > nvpr type: bool default: false. > Use NV_path_rendering OpenGL and OpenGL ES extension. > samples type: int default: 0. > Use multisampling with N samples. > > Predefined configs: > > gpu = gpu() > msaa4 = gpu(samples=4) > msaa16 = gpu(samples=16) > nvprmsaa4 = gpu(nvpr=true,samples=4) > nvprmsaa16 = gpu(nvpr=true,samples=16) > gpudft = gpu(dit=true) > gpudebug = gpu(api=debug) > gpunull = gpu(api=null) > debug = gpu(api=debug) > nullgpu = gpu(api=null) > > BUG=skia:2992 > > Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23 TBR=bsalomon@google.com,scroggo@google.com,joshualitt@google.com,kkinnunen@nvidia.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:2992 Review URL: https://codereview.chromium.org/1528473002
Diffstat (limited to 'tools/flags/SkCommandLineFlags.h')
-rw-r--r--tools/flags/SkCommandLineFlags.h34
1 files changed, 8 insertions, 26 deletions
diff --git a/tools/flags/SkCommandLineFlags.h b/tools/flags/SkCommandLineFlags.h
index 460b4c32d2..5909413523 100644
--- a/tools/flags/SkCommandLineFlags.h
+++ b/tools/flags/SkCommandLineFlags.h
@@ -76,11 +76,6 @@
* as its value. All strings that follow the flag on the command line (until
* a string that begins with '-') will be entries in the array.
*
- * DEFINE_extended_string(args, .., .., extendedHelpString);
- *
- * creates a similar string array flag as DEFINE_string. The flag will have extended help text
- * (extendedHelpString) that can the user can see with '--help <args>' flag.
- *
* Any flag can be referenced from another file after using the following:
*
* DECLARE_x(name);
@@ -209,15 +204,7 @@ SK_UNUSED static bool unused_##name = SkFlagInfo::CreateStringFlag(TO_STRING(nam
nullptr, \
&FLAGS_##name, \
defaultValue, \
- helpString, nullptr)
-#define DEFINE_extended_string(name, defaultValue, helpString, extendedHelpString) \
-SkCommandLineFlags::StringArray FLAGS_##name; \
-SK_UNUSED static bool unused_##name = SkFlagInfo::CreateStringFlag(TO_STRING(name), \
- nullptr, \
- &FLAGS_##name, \
- defaultValue, \
- helpString, \
- extendedHelpString)
+ helpString)
// string2 allows specifying a short name. There is an assert that shortName
// is only 1 character.
@@ -227,7 +214,7 @@ SK_UNUSED static bool unused_##name = SkFlagInfo::CreateStringFlag(TO_STRING(nam
TO_STRING(shortName), \
&FLAGS_##name, \
defaultValue, \
- helpString, nullptr)
+ helpString)
#define DECLARE_string(name) extern SkCommandLineFlags::StringArray FLAGS_##name;
@@ -286,7 +273,7 @@ public:
*/
static bool CreateBoolFlag(const char* name, const char* shortName, bool* pBool,
bool defaultValue, const char* helpString) {
- SkFlagInfo* info = new SkFlagInfo(name, shortName, kBool_FlagType, helpString, nullptr);
+ SkFlagInfo* info = new SkFlagInfo(name, shortName, kBool_FlagType, helpString);
info->fBoolValue = pBool;
*info->fBoolValue = info->fDefaultBool = defaultValue;
return true;
@@ -300,15 +287,14 @@ public:
*/
static bool CreateStringFlag(const char* name, const char* shortName,
SkCommandLineFlags::StringArray* pStrings,
- const char* defaultValue, const char* helpString,
- const char* extendedHelpString);
+ const char* defaultValue, const char* helpString);
/**
* See comments for CreateBoolFlag.
*/
static bool CreateIntFlag(const char* name, int32_t* pInt,
int32_t defaultValue, const char* helpString) {
- SkFlagInfo* info = new SkFlagInfo(name, nullptr, kInt_FlagType, helpString, nullptr);
+ SkFlagInfo* info = new SkFlagInfo(name, nullptr, kInt_FlagType, helpString);
info->fIntValue = pInt;
*info->fIntValue = info->fDefaultInt = defaultValue;
return true;
@@ -316,7 +302,7 @@ public:
static bool CreateIntFlag(const char* name, const char* shortName, int32_t* pInt,
int32_t defaultValue, const char* helpString) {
- SkFlagInfo* info = new SkFlagInfo(name, shortName, kInt_FlagType, helpString, nullptr);
+ SkFlagInfo* info = new SkFlagInfo(name, shortName, kInt_FlagType, helpString);
info->fIntValue = pInt;
*info->fIntValue = info->fDefaultInt = defaultValue;
return true;
@@ -327,7 +313,7 @@ public:
*/
static bool CreateDoubleFlag(const char* name, double* pDouble,
double defaultValue, const char* helpString) {
- SkFlagInfo* info = new SkFlagInfo(name, nullptr, kDouble_FlagType, helpString, nullptr);
+ SkFlagInfo* info = new SkFlagInfo(name, nullptr, kDouble_FlagType, helpString);
info->fDoubleValue = pDouble;
*info->fDoubleValue = info->fDefaultDouble = defaultValue;
return true;
@@ -397,7 +383,6 @@ public:
const SkString& shortName() const { return fShortName; }
const SkString& help() const { return fHelpString; }
- const SkString& extendedHelp() const { return fExtendedHelpString; }
SkString defaultValue() const {
SkString result;
@@ -436,13 +421,11 @@ public:
}
private:
- SkFlagInfo(const char* name, const char* shortName, FlagTypes type, const char* helpString,
- const char* extendedHelpString)
+ SkFlagInfo(const char* name, const char* shortName, FlagTypes type, const char* helpString)
: fName(name)
, fShortName(shortName)
, fFlagType(type)
, fHelpString(helpString)
- , fExtendedHelpString(extendedHelpString)
, fBoolValue(nullptr)
, fDefaultBool(false)
, fIntValue(nullptr)
@@ -470,7 +453,6 @@ private:
SkString fShortName;
FlagTypes fFlagType;
SkString fHelpString;
- SkString fExtendedHelpString;
bool* fBoolValue;
bool fDefaultBool;
int32_t* fIntValue;