OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 /* | 8 /* |
9 * Code for the "gm" (Golden Master) rendering comparison tool. | 9 * Code for the "gm" (Golden Master) rendering comparison tool. |
10 * | 10 * |
(...skipping 1420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1431 DEFINE_bool(forceBWtext, false, "Disable text anti-aliasing."); | 1431 DEFINE_bool(forceBWtext, false, "Disable text anti-aliasing."); |
1432 #if SK_SUPPORT_GPU | 1432 #if SK_SUPPORT_GPU |
1433 DEFINE_string(gpuAPI, "", "Force use of specific gpu API. Using \"gl\" " | 1433 DEFINE_string(gpuAPI, "", "Force use of specific gpu API. Using \"gl\" " |
1434 "forces OpenGL API. Using \"gles\" forces OpenGL ES API. " | 1434 "forces OpenGL API. Using \"gles\" forces OpenGL ES API. " |
1435 "Defaults to empty string, which selects the API native to the " | 1435 "Defaults to empty string, which selects the API native to the " |
1436 "system."); | 1436 "system."); |
1437 DEFINE_string(gpuCacheSize, "", "<bytes> <count>: Limit the gpu cache to byte si
ze or " | 1437 DEFINE_string(gpuCacheSize, "", "<bytes> <count>: Limit the gpu cache to byte si
ze or " |
1438 "object count. " TOSTRING(DEFAULT_CACHE_VALUE) " for either value
means " | 1438 "object count. " TOSTRING(DEFAULT_CACHE_VALUE) " for either value
means " |
1439 "use the default. 0 for either disables the cache."); | 1439 "use the default. 0 for either disables the cache."); |
1440 DEFINE_bool(gpu, true, "Allows GPU configs to be run. Applied after --config."); | 1440 DEFINE_bool(gpu, true, "Allows GPU configs to be run. Applied after --config."); |
| 1441 DEFINE_bool(gpuCompressAlphaMasks, false, "Compress masks generated from falling
back to " |
| 1442 "software path rendering."); |
1441 #endif | 1443 #endif |
1442 DEFINE_bool(hierarchy, false, "Whether to use multilevel directory structure " | 1444 DEFINE_bool(hierarchy, false, "Whether to use multilevel directory structure " |
1443 "when reading/writing files."); | 1445 "when reading/writing files."); |
1444 DEFINE_string(ignoreErrorTypes, kDefaultIgnorableErrorTypes.asString(" ").c_str(
), | 1446 DEFINE_string(ignoreErrorTypes, kDefaultIgnorableErrorTypes.asString(" ").c_str(
), |
1445 "Space-separated list of ErrorTypes that should be ignored. If any
*other* error " | 1447 "Space-separated list of ErrorTypes that should be ignored. If any
*other* error " |
1446 "types are encountered, the tool will exit with a nonzero return v
alue."); | 1448 "types are encountered, the tool will exit with a nonzero return v
alue."); |
1447 DEFINE_string(ignoreFailuresFile, "", "Path to file containing a list of tests f
or which we " | 1449 DEFINE_string(ignoreFailuresFile, "", "Path to file containing a list of tests f
or which we " |
1448 "should ignore failures.\n" | 1450 "should ignore failures.\n" |
1449 "The file should list one test per line, except for comment lines
starting with #"); | 1451 "The file should list one test per line, except for comment lines
starting with #"); |
1450 DEFINE_bool2(leaks, l, false, "show leaked ref cnt'd objects."); | 1452 DEFINE_bool2(leaks, l, false, "show leaked ref cnt'd objects."); |
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2277 GMMain gmmain; | 2279 GMMain gmmain; |
2278 | 2280 |
2279 SkTDArray<size_t> configs; | 2281 SkTDArray<size_t> configs; |
2280 | 2282 |
2281 int moduloRemainder = -1; | 2283 int moduloRemainder = -1; |
2282 int moduloDivisor = -1; | 2284 int moduloDivisor = -1; |
2283 SkTDArray<const PDFRasterizerData*> pdfRasterizers; | 2285 SkTDArray<const PDFRasterizerData*> pdfRasterizers; |
2284 SkTDArray<SkScalar> tileGridReplayScales; | 2286 SkTDArray<SkScalar> tileGridReplayScales; |
2285 #if SK_SUPPORT_GPU | 2287 #if SK_SUPPORT_GPU |
2286 GrGLStandard gpuAPI = kNone_GrGLStandard; | 2288 GrGLStandard gpuAPI = kNone_GrGLStandard; |
2287 GrContextFactory* grFactory = new GrContextFactory(GrContext::Options()); | 2289 GrContext::Options grContextOpts; |
| 2290 grContextOpts.fDrawPathToCompressedTexture = FLAGS_gpuCompressAlphaMasks; |
| 2291 GrContextFactory* grFactory = new GrContextFactory(grContextOpts); |
2288 #else | 2292 #else |
2289 GrGLStandard gpuAPI = 0; | 2293 GrGLStandard gpuAPI = 0; |
2290 GrContextFactory* grFactory = NULL; | 2294 GrContextFactory* grFactory = NULL; |
2291 #endif | 2295 #endif |
2292 | 2296 |
2293 if (FLAGS_dryRun) { | 2297 if (FLAGS_dryRun) { |
2294 SkDebugf( "Doing a dry run; no tests will actually be executed.\n"); | 2298 SkDebugf( "Doing a dry run; no tests will actually be executed.\n"); |
2295 } | 2299 } |
2296 | 2300 |
2297 if (!parse_flags_modulo(&moduloRemainder, &moduloDivisor) || | 2301 if (!parse_flags_modulo(&moduloRemainder, &moduloDivisor) || |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2494 if (FLAGS_forceBWtext) { | 2498 if (FLAGS_forceBWtext) { |
2495 canvas->setDrawFilter(SkNEW(BWTextDrawFilter))->unref(); | 2499 canvas->setDrawFilter(SkNEW(BWTextDrawFilter))->unref(); |
2496 } | 2500 } |
2497 } | 2501 } |
2498 | 2502 |
2499 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) | 2503 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) |
2500 int main(int argc, char * const argv[]) { | 2504 int main(int argc, char * const argv[]) { |
2501 return tool_main(argc, (char**) argv); | 2505 return tool_main(argc, (char**) argv); |
2502 } | 2506 } |
2503 #endif | 2507 #endif |
OLD | NEW |