| 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 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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."); | |
| 1403 DEFINE_bool(pipe, false, "Exercise the SkGPipe replay test pass."); | 1402 DEFINE_bool(pipe, false, "Exercise the SkGPipe replay test pass."); |
| 1404 DEFINE_string2(readPath, r, "", "Read reference images from this dir, and report
" | 1403 DEFINE_string2(readPath, r, "", "Read reference images from this dir, and report
" |
| 1405 "any differences between those and the newly generated ones."); | 1404 "any differences between those and the newly generated ones."); |
| 1406 DEFINE_bool(replay, false, "Exercise the SkPicture replay test pass."); | 1405 DEFINE_bool(replay, false, "Exercise the SkPicture replay test pass."); |
| 1407 DEFINE_string2(resourcePath, i, "", "Directory that stores image resources."); | 1406 DEFINE_string2(resourcePath, i, "", "Directory that stores image resources."); |
| 1408 DEFINE_bool(rtree, false, "Exercise the R-Tree variant of SkPicture test pass.")
; | 1407 DEFINE_bool(rtree, false, "Exercise the R-Tree variant of SkPicture test pass.")
; |
| 1409 DEFINE_bool(serialize, false, "Exercise the SkPicture serialization & deserializ
ation test pass."); | 1408 DEFINE_bool(serialize, false, "Exercise the SkPicture serialization & deserializ
ation test pass."); |
| 1410 DEFINE_bool(simulatePipePlaybackFailure, false, "Simulate a rendering failure in
pipe mode only."); | 1409 DEFINE_bool(simulatePipePlaybackFailure, false, "Simulate a rendering failure in
pipe mode only."); |
| 1411 DEFINE_bool(tiledPipe, false, "Exercise tiled SkGPipe replay."); | 1410 DEFINE_bool(tiledPipe, false, "Exercise tiled SkGPipe replay."); |
| 1412 DEFINE_bool(tileGrid, false, "Exercise the tile grid variant of SkPicture."); | 1411 DEFINE_bool(tileGrid, false, "Exercise the tile grid variant of SkPicture."); |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1505 | 1504 |
| 1506 for (int i = 0; i < configs.count(); i++) { | 1505 for (int i = 0; i < configs.count(); i++) { |
| 1507 ConfigData config = gRec[configs[i]]; | 1506 ConfigData config = gRec[configs[i]]; |
| 1508 const SkString shortNamePlusConfig = gmmain.make_shortname_plus_config(g
m->shortName(), | 1507 const SkString shortNamePlusConfig = gmmain.make_shortname_plus_config(g
m->shortName(), |
| 1509 c
onfig.fName); | 1508 c
onfig.fName); |
| 1510 | 1509 |
| 1511 // Skip any tests that we don't even need to try. | 1510 // Skip any tests that we don't even need to try. |
| 1512 // If any of these were skipped on a per-GM basis, record them as | 1511 // If any of these were skipped on a per-GM basis, record them as |
| 1513 // kIntentionallySkipped. | 1512 // kIntentionallySkipped. |
| 1514 if (kPDF_Backend == config.fBackend) { | 1513 if (kPDF_Backend == config.fBackend) { |
| 1515 if (!FLAGS_pdf) { | |
| 1516 continue; | |
| 1517 } | |
| 1518 if (gmFlags & GM::kSkipPDF_Flag) { | 1514 if (gmFlags & GM::kSkipPDF_Flag) { |
| 1519 gmmain.RecordTestResults(kIntentionallySkipped_ErrorType, shortN
amePlusConfig, | 1515 gmmain.RecordTestResults(kIntentionallySkipped_ErrorType, shortN
amePlusConfig, |
| 1520 renderModeDescriptor); | 1516 renderModeDescriptor); |
| 1521 errorsForAllConfigs.add(kIntentionallySkipped_ErrorType); | 1517 errorsForAllConfigs.add(kIntentionallySkipped_ErrorType); |
| 1522 continue; | 1518 continue; |
| 1523 } | 1519 } |
| 1524 } | 1520 } |
| 1525 if ((gmFlags & GM::kSkip565_Flag) && | 1521 if ((gmFlags & GM::kSkip565_Flag) && |
| 1526 (kRaster_Backend == config.fBackend) && | 1522 (kRaster_Backend == config.fBackend) && |
| 1527 (SkBitmap::kRGB_565_Config == config.fConfig)) { | 1523 (SkBitmap::kRGB_565_Config == config.fConfig)) { |
| (...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2271 if (FLAGS_forceBWtext) { | 2267 if (FLAGS_forceBWtext) { |
| 2272 canvas->setDrawFilter(SkNEW(BWTextDrawFilter))->unref(); | 2268 canvas->setDrawFilter(SkNEW(BWTextDrawFilter))->unref(); |
| 2273 } | 2269 } |
| 2274 } | 2270 } |
| 2275 | 2271 |
| 2276 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) | 2272 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) |
| 2277 int main(int argc, char * const argv[]) { | 2273 int main(int argc, char * const argv[]) { |
| 2278 return tool_main(argc, (char**) argv); | 2274 return tool_main(argc, (char**) argv); |
| 2279 } | 2275 } |
| 2280 #endif | 2276 #endif |
| OLD | NEW |