aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/skpbench
diff options
context:
space:
mode:
authorGravatar csmartdalton <csmartdalton@google.com>2017-02-22 12:00:42 -0700
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-22 20:29:56 +0000
commit008b9d80ab9adbf2656eceaf54d11cd15e4dda05 (patch)
tree06d4863dc3f65dcdb6704ec65f31800e544ea181 /tools/skpbench
parent19eec39c90a357ff3476d65f2c672096f55518e3 (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 'tools/skpbench')
-rw-r--r--tools/skpbench/skpbench.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/skpbench/skpbench.cpp b/tools/skpbench/skpbench.cpp
index 3887c5ea88..569c204a72 100644
--- a/tools/skpbench/skpbench.cpp
+++ b/tools/skpbench/skpbench.cpp
@@ -8,6 +8,7 @@
#include "GpuTimer.h"
#include "GrContextFactory.h"
#include "SkCanvas.h"
+#include "SkCommonFlagsPathRenderer.h"
#include "SkOSFile.h"
#include "SkOSPath.h"
#include "SkPerlinNoiseShader.h"
@@ -46,6 +47,7 @@ DEFINE_string(skp, "", "path to a single .skp file, or 'warmup' for a builtin wa
DEFINE_string(png, "", "if set, save a .png proof to disk at this file location");
DEFINE_int32(verbosity, 4, "level of verbosity (0=none to 5=debug)");
DEFINE_bool(suppressHeader, false, "don't print a header row before the results");
+DEFINE_pathrenderer_flag;
static const char* header =
" accum median max min stddev samples sample_ms clock metric config bench";
@@ -271,7 +273,9 @@ int main(int argc, char** argv) {
}
// Create a context.
- sk_gpu_test::GrContextFactory factory;
+ GrContextOptions ctxOptions;
+ ctxOptions.fGpuPathRenderers = CollectGpuPathRenderersFromFlags();
+ sk_gpu_test::GrContextFactory factory(ctxOptions);
sk_gpu_test::ContextInfo ctxInfo =
factory.getContextInfo(config->getContextType(), config->getContextOverrides());
GrContext* ctx = ctxInfo.grContext();