Add visualbench option for nvpr stencil samples

Repurposes the --nvpr flag as an int that says how many stencil samples
to use, or disables nvpr with a value of zero.

BUG=skia:

Review URL: https://codereview.chromium.org/1444543002
This commit is contained in:
cdalton 2015-11-13 09:10:31 -08:00 committed by Commit bot
parent f844177496
commit 60795d99ff
4 changed files with 5 additions and 5 deletions

View File

@ -103,7 +103,7 @@ void VisualBench::setupContext() {
fInterface.reset(GrGLCreateNativeInterface());
// TODO use the GLContext creation factories and also set this all up in configs
if (!FLAGS_nvpr) {
if (0 == FLAGS_nvpr) {
fInterface.reset(GrGLInterfaceRemoveNVPR(fInterface));
}
SkASSERT(fInterface);

View File

@ -131,8 +131,8 @@ Benchmark* VisualBenchmarkStream::next() {
// TODO move this all to --config
if (bench && FLAGS_cpu) {
bench = new CpuWrappedBenchmark(fSurfaceProps, bench);
} else if (bench && FLAGS_nvpr) {
bench = new NvprWrappedBenchmark(fSurfaceProps, bench, 4);
} else if (bench && 0 != FLAGS_nvpr) {
bench = new NvprWrappedBenchmark(fSurfaceProps, bench, FLAGS_nvpr);
}
fBenchmark.reset(bench);

View File

@ -8,4 +8,4 @@
#include "VisualFlags.h"
DEFINE_int32(msaa, 0, "Number of msaa samples.");
DEFINE_bool(nvpr, false, "Run in NVPR mode?");
DEFINE_int32(nvpr, 0, "Number of stencil samples for nvpr, or zero to disable it.");

View File

@ -12,6 +12,6 @@
DECLARE_string(config);
DECLARE_int32(msaa);
DECLARE_bool(nvpr);
DECLARE_int32(nvpr);
#endif