diff options
author | joshualitt <joshualitt@google.com> | 2015-12-18 06:02:18 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-18 06:02:18 -0800 |
commit | 4dabf83cbe3096eaa7b80c101ba0e9c277b560d2 (patch) | |
tree | 170bd28122dff87889eb80ec1ca879be224e0e08 /tools/flags/SkCommandLineFlags.h | |
parent | e848ff59651e4441b2c303ef14db10fd678cee9f (diff) |
Revert of Add config options to run different GPU APIs to dm and nanobench (patchset #18 id:340001 of https://codereview.chromium.org/1490113005/ )
Reason for revert:
This CL changed 1200 images on gold, when I wouldn't expect any diffs from the description.
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
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
>
> Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
TBR=mtklein@google.com,bsalomon@google.com,scroggo@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992
Review URL: https://codereview.chromium.org/1536963002
Diffstat (limited to 'tools/flags/SkCommandLineFlags.h')
-rw-r--r-- | tools/flags/SkCommandLineFlags.h | 38 |
1 files changed, 8 insertions, 30 deletions
diff --git a/tools/flags/SkCommandLineFlags.h b/tools/flags/SkCommandLineFlags.h index 909718d3e7..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); @@ -119,10 +114,6 @@ public: */ class StringArray { public: - StringArray() { } - explicit StringArray(const SkTArray<SkString>& strings) - : fStrings(strings) { - } const char* operator[](int i) const { SkASSERT(i >= 0 && i < fStrings.count()); return fStrings[i].c_str(); @@ -213,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. @@ -231,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; @@ -290,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; @@ -304,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; @@ -320,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; @@ -331,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; @@ -401,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; @@ -440,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) @@ -474,7 +453,6 @@ private: SkString fShortName; FlagTypes fFlagType; SkString fHelpString; - SkString fExtendedHelpString; bool* fBoolValue; bool fDefaultBool; int32_t* fIntValue; |