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 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1360 | 1360 |
1361 // Macro magic to convert a numeric preprocessor token into a string. | 1361 // Macro magic to convert a numeric preprocessor token into a string. |
1362 // Adapted from http://stackoverflow.com/questions/240353/convert-a-preprocessor
-token-to-a-string | 1362 // Adapted from http://stackoverflow.com/questions/240353/convert-a-preprocessor
-token-to-a-string |
1363 // This should probably be moved into one of our common headers... | 1363 // This should probably be moved into one of our common headers... |
1364 #define TOSTRING_INTERNAL(x) #x | 1364 #define TOSTRING_INTERNAL(x) #x |
1365 #define TOSTRING(x) TOSTRING_INTERNAL(x) | 1365 #define TOSTRING(x) TOSTRING_INTERNAL(x) |
1366 | 1366 |
1367 // Alphabetized ignoring "no" prefix ("readPath", "noreplay", "resourcePath"). | 1367 // Alphabetized ignoring "no" prefix ("readPath", "noreplay", "resourcePath"). |
1368 DEFINE_string(config, "", configUsage().c_str()); | 1368 DEFINE_string(config, "", configUsage().c_str()); |
1369 DEFINE_string(pdfRasterizers, "", pdfRasterizerUsage().c_str()); | 1369 DEFINE_string(pdfRasterizers, "", pdfRasterizerUsage().c_str()); |
1370 DEFINE_bool(deferred, false, "Exercise the deferred rendering test pass."); | 1370 DEFINE_bool(deferred, true, "Exercise the deferred rendering test pass."); |
1371 DEFINE_string(excludeConfig, "", "Space delimited list of configs to skip."); | 1371 DEFINE_string(excludeConfig, "", "Space delimited list of configs to skip."); |
1372 DEFINE_bool(forceBWtext, false, "Disable text anti-aliasing."); | 1372 DEFINE_bool(forceBWtext, false, "Disable text anti-aliasing."); |
1373 #if SK_SUPPORT_GPU | 1373 #if SK_SUPPORT_GPU |
1374 DEFINE_string(gpuCacheSize, "", "<bytes> <count>: Limit the gpu cache to byte si
ze or " | 1374 DEFINE_string(gpuCacheSize, "", "<bytes> <count>: Limit the gpu cache to byte si
ze or " |
1375 "object count. " TOSTRING(DEFAULT_CACHE_VALUE) " for either value
means " | 1375 "object count. " TOSTRING(DEFAULT_CACHE_VALUE) " for either value
means " |
1376 "use the default. 0 for either disables the cache."); | 1376 "use the default. 0 for either disables the cache."); |
1377 #endif | 1377 #endif |
1378 DEFINE_bool(hierarchy, false, "Whether to use multilevel directory structure " | 1378 DEFINE_bool(hierarchy, false, "Whether to use multilevel directory structure " |
1379 "when reading/writing files."); | 1379 "when reading/writing files."); |
1380 DEFINE_string(ignoreErrorTypes, kDefaultIgnorableErrorTypes.asString(" ").c_str(
), | 1380 DEFINE_string(ignoreErrorTypes, kDefaultIgnorableErrorTypes.asString(" ").c_str(
), |
1381 "Space-separated list of ErrorTypes that should be ignored. If any
*other* error " | 1381 "Space-separated list of ErrorTypes that should be ignored. If any
*other* error " |
1382 "types are encountered, the tool will exit with a nonzero return v
alue."); | 1382 "types are encountered, the tool will exit with a nonzero return v
alue."); |
1383 DEFINE_string(match, "", "[~][^]substring[$] [...] of test name to run.\n" | 1383 DEFINE_string(match, "", "[~][^]substring[$] [...] of test name to run.\n" |
1384 "Multiple matches may be separated by spaces.\n" | 1384 "Multiple matches may be separated by spaces.\n" |
1385 "~ causes a matching test to always be skipped\n" | 1385 "~ causes a matching test to always be skipped\n" |
1386 "^ requires the start of the test to match\n" | 1386 "^ requires the start of the test to match\n" |
1387 "$ requires the end of the test to match\n" | 1387 "$ requires the end of the test to match\n" |
1388 "^ and $ requires an exact match\n" | 1388 "^ and $ requires an exact match\n" |
1389 "If a test does not match any list entry,\n" | 1389 "If a test does not match any list entry,\n" |
1390 "it is skipped unless some list entry starts with ~"); | 1390 "it is skipped unless some list entry starts with ~"); |
1391 DEFINE_string(missingExpectationsPath, "", "Write images for tests without expec
tations " | 1391 DEFINE_string(missingExpectationsPath, "", "Write images for tests without expec
tations " |
1392 "into this directory."); | 1392 "into this directory."); |
1393 DEFINE_string(mismatchPath, "", "Write images for tests that failed due to " | 1393 DEFINE_string(mismatchPath, "", "Write images for tests that failed due to " |
1394 "pixel mismatches into this directory."); | 1394 "pixel mismatches into this directory."); |
1395 DEFINE_string(modulo, "", "[--modulo <remainder> <divisor>]: only run tests for
which " | 1395 DEFINE_string(modulo, "", "[--modulo <remainder> <divisor>]: only run tests for
which " |
1396 "testIndex %% divisor == remainder."); | 1396 "testIndex %% divisor == remainder."); |
1397 DEFINE_bool(pdf, true, "Exercise the pdf rendering test pass."); | 1397 DEFINE_bool(pdf, true, "Exercise the pdf rendering test pass."); |
1398 DEFINE_bool(pipe, false, "Exercise the SkGPipe replay test pass."); | 1398 DEFINE_bool(pipe, true, "Exercise the SkGPipe replay test pass."); |
1399 DEFINE_string2(readPath, r, "", "Read reference images from this dir, and report
" | 1399 DEFINE_string2(readPath, r, "", "Read reference images from this dir, and report
" |
1400 "any differences between those and the newly generated ones."); | 1400 "any differences between those and the newly generated ones."); |
1401 DEFINE_bool(replay, false, "Exercise the SkPicture replay test pass."); | 1401 DEFINE_bool(replay, true, "Exercise the SkPicture replay test pass."); |
1402 DEFINE_string2(resourcePath, i, "", "Directory that stores image resources."); | 1402 DEFINE_string2(resourcePath, i, "", "Directory that stores image resources."); |
1403 DEFINE_bool(rtree, false, "Exercise the R-Tree variant of SkPicture test pass.")
; | 1403 DEFINE_bool(rtree, true, "Exercise the R-Tree variant of SkPicture test pass."); |
1404 DEFINE_bool(serialize, false, "Exercise the SkPicture serialization & deserializ
ation test pass."); | 1404 DEFINE_bool(serialize, true, "Exercise the SkPicture serialization & deserializa
tion test pass."); |
1405 DEFINE_bool(simulatePipePlaybackFailure, false, "Simulate a rendering failure in
pipe mode only."); | 1405 DEFINE_bool(simulatePipePlaybackFailure, false, "Simulate a rendering failure in
pipe mode only."); |
1406 DEFINE_bool(tiledPipe, false, "Exercise tiled SkGPipe replay."); | 1406 DEFINE_bool(tiledPipe, false, "Exercise tiled SkGPipe replay."); |
1407 DEFINE_bool(tileGrid, false, "Exercise the tile grid variant of SkPicture."); | 1407 DEFINE_bool(tileGrid, true, "Exercise the tile grid variant of SkPicture."); |
1408 DEFINE_string(tileGridReplayScales, "", "Space separated list of floating-point
scale " | 1408 DEFINE_string(tileGridReplayScales, "", "Space separated list of floating-point
scale " |
1409 "factors to be used for tileGrid playback testing. Default value:
1.0"); | 1409 "factors to be used for tileGrid playback testing. Default value:
1.0"); |
1410 DEFINE_bool2(verbose, v, false, "Give more detail (e.g. list all GMs run, more i
nfo about " | 1410 DEFINE_bool2(verbose, v, false, "Give more detail (e.g. list all GMs run, more i
nfo about " |
1411 "each test)."); | 1411 "each test)."); |
1412 DEFINE_bool(writeChecksumBasedFilenames, false, "When writing out actual images,
use checksum-" | 1412 DEFINE_bool(writeChecksumBasedFilenames, false, "When writing out actual images,
use checksum-" |
1413 "based filenames, as rebaseline.py will use when downloading them fr
om Google Storage"); | 1413 "based filenames, as rebaseline.py will use when downloading them fr
om Google Storage"); |
1414 DEFINE_string(writeJsonSummaryPath, "", "Write a JSON-formatted result summary t
o this file."); | 1414 DEFINE_string(writeJsonSummaryPath, "", "Write a JSON-formatted result summary t
o this file."); |
1415 DEFINE_string2(writePath, w, "", "Write rendered images into this directory."); | 1415 DEFINE_string2(writePath, w, "", "Write rendered images into this directory."); |
1416 DEFINE_string2(writePicturePath, p, "", "Write .skp files into this directory.")
; | 1416 DEFINE_string2(writePicturePath, p, "", "Write .skp files into this directory.")
; |
1417 DEFINE_int32(pdfJpegQuality, -1, "Encodes images in JPEG at quality level N, " | 1417 DEFINE_int32(pdfJpegQuality, -1, "Encodes images in JPEG at quality level N, " |
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2246 if (FLAGS_forceBWtext) { | 2246 if (FLAGS_forceBWtext) { |
2247 canvas->setDrawFilter(SkNEW(BWTextDrawFilter))->unref(); | 2247 canvas->setDrawFilter(SkNEW(BWTextDrawFilter))->unref(); |
2248 } | 2248 } |
2249 } | 2249 } |
2250 | 2250 |
2251 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) | 2251 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) |
2252 int main(int argc, char * const argv[]) { | 2252 int main(int argc, char * const argv[]) { |
2253 return tool_main(argc, (char**) argv); | 2253 return tool_main(argc, (char**) argv); |
2254 } | 2254 } |
2255 #endif | 2255 #endif |
OLD | NEW |