aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench
diff options
context:
space:
mode:
authorGravatar krajcevski <krajcevski@google.com>2014-08-13 12:06:26 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-08-13 12:06:26 -0700
commit12b3544028e74712c6c095ed3a2e8a78de6b2ed8 (patch)
treee63228df7483fb8a0872eaca506df59ac7ec3136 /bench
parent3140576f2fe3fd5d6ae72d2306d4723e319dee63 (diff)
Add runtime flag to turn compressed alpha masks on
R=bsalomon@google.com, robertphillips@google.com, mtklein@google.com Author: krajcevski@google.com Review URL: https://codereview.chromium.org/468293002
Diffstat (limited to 'bench')
-rw-r--r--bench/nanobench.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp
index 3522c4acb2..c8c9c6f6ac 100644
--- a/bench/nanobench.cpp
+++ b/bench/nanobench.cpp
@@ -56,6 +56,8 @@ DEFINE_double(overheadGoal, 0.0001,
"Loop until timer overhead is at most this fraction of our measurments.");
DEFINE_double(gpuMs, 5, "Target bench time in millseconds for GPU.");
DEFINE_int32(gpuFrameLag, 5, "Overestimate of maximum number of frames GPU allows to lag.");
+DEFINE_bool(gpuCompressAlphaMasks, false, "Compress masks generated from falling back to "
+ "software path rendering.");
DEFINE_string(outResultsFile, "", "If given, write results here as JSON.");
DEFINE_int32(maxCalibrationAttempts, 3,
@@ -529,7 +531,9 @@ int nanobench_main() {
SkAutoGraphics ag;
#if SK_SUPPORT_GPU
- gGrFactory.reset(SkNEW_ARGS(GrContextFactory, (GrContext::Options())));
+ GrContext::Options grContextOpts;
+ grContextOpts.fDrawPathToCompressedTexture = FLAGS_gpuCompressAlphaMasks;
+ gGrFactory.reset(SkNEW_ARGS(GrContextFactory, (grContextOpts)));
#endif
if (kAutoTuneLoops != FLAGS_loops) {