aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm
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 /gm
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 'gm')
-rw-r--r--gm/gmmain.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp
index eb9147b628..7f012bc79c 100644
--- a/gm/gmmain.cpp
+++ b/gm/gmmain.cpp
@@ -1438,6 +1438,8 @@ DEFINE_string(gpuCacheSize, "", "<bytes> <count>: Limit the gpu cache to byte si
"object count. " TOSTRING(DEFAULT_CACHE_VALUE) " for either value means "
"use the default. 0 for either disables the cache.");
DEFINE_bool(gpu, true, "Allows GPU configs to be run. Applied after --config.");
+DEFINE_bool(gpuCompressAlphaMasks, false, "Compress masks generated from falling back to "
+ "software path rendering.");
#endif
DEFINE_bool(hierarchy, false, "Whether to use multilevel directory structure "
"when reading/writing files.");
@@ -2284,7 +2286,9 @@ int tool_main(int argc, char** argv) {
SkTDArray<SkScalar> tileGridReplayScales;
#if SK_SUPPORT_GPU
GrGLStandard gpuAPI = kNone_GrGLStandard;
- GrContextFactory* grFactory = new GrContextFactory(GrContext::Options());
+ GrContext::Options grContextOpts;
+ grContextOpts.fDrawPathToCompressedTexture = FLAGS_gpuCompressAlphaMasks;
+ GrContextFactory* grFactory = new GrContextFactory(grContextOpts);
#else
GrGLStandard gpuAPI = 0;
GrContextFactory* grFactory = NULL;