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