Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(413)

Unified Diff: bench/nanobench.cpp

Issue 468293002: Add runtime flag to turn compressed alpha masks on (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add flag to bench/render pictures Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gm/gmmain.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/nanobench.cpp
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp
index 3522c4acb228ad60a26f33a5c6b38299cd2cc8fb..c8c9c6f6ac669da1900762a32c3f2beca9a78ca8 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) {
« no previous file with comments | « no previous file | gm/gmmain.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698