diff options
author | csmartdalton <csmartdalton@google.com> | 2017-02-22 12:00:42 -0700 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-02-22 20:29:56 +0000 |
commit | 008b9d80ab9adbf2656eceaf54d11cd15e4dda05 (patch) | |
tree | 06d4863dc3f65dcdb6704ec65f31800e544ea181 /bench/nanobench.cpp | |
parent | 19eec39c90a357ff3476d65f2c672096f55518e3 (diff) |
Add the ability to enable/disable GPU path renderers
Adds a bitfield to GrContextOptions that masks out path renderers.
Adds commandline flags support to set this bitfield in tools apps.
Removes GrGLInterfaceRemoveNVPR since we can now accomplish the same
thing in the context options.
BUG=skia:
Change-Id: Icf2a4df36374b3ba2f69ebf0db56e8aedd6cf65f
Reviewed-on: https://skia-review.googlesource.com/8786
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'bench/nanobench.cpp')
-rw-r--r-- | bench/nanobench.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp index e97e9a0bf3..f73ae464cc 100644 --- a/bench/nanobench.cpp +++ b/bench/nanobench.cpp @@ -33,6 +33,7 @@ #include "SkCodec.h" #include "SkCommonFlags.h" #include "SkCommonFlagsConfig.h" +#include "SkCommonFlagsPathRenderer.h" #include "SkData.h" #include "SkGraphics.h" #include "SkLeanWindows.h" @@ -128,6 +129,10 @@ DEFINE_string(sourceType, "", DEFINE_string(benchType, "", "Apply usual --match rules to bench type: micro, recording, piping, playback, skcodec, etc."); +#if SK_SUPPORT_GPU +DEFINE_pathrenderer_flag; +#endif + static double now_ms() { return SkTime::GetNSecs() * 1e-6; } static SkString humanize(double ms) { @@ -1106,6 +1111,7 @@ int main(int argc, char** argv) { #if SK_SUPPORT_GPU GrContextOptions grContextOpts; + grContextOpts.fGpuPathRenderers = CollectGpuPathRenderersFromFlags(); gGrFactory.reset(new GrContextFactory(grContextOpts)); #endif |