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

Unified Diff: gm/gmmain.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 | « bench/nanobench.cpp ('k') | include/gpu/GrContextFactory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/gmmain.cpp
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp
index eb9147b628341b7e70a12fdcb017d3de5db09eef..7f012bc79ce8337bac4a9365c0984b2d7fc090c9 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;
« no previous file with comments | « bench/nanobench.cpp ('k') | include/gpu/GrContextFactory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698