| 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 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 814 */ | 814 */ |
| 815 void add_actual_results_to_json_summary(const char testName[], | 815 void add_actual_results_to_json_summary(const char testName[], |
| 816 const GmResultDigest &actualResultDi
gest, | 816 const GmResultDigest &actualResultDi
gest, |
| 817 ErrorCombination errors, | 817 ErrorCombination errors, |
| 818 bool ignoreFailure) { | 818 bool ignoreFailure) { |
| 819 Json::Value jsonActualResults = actualResultDigest.asJsonTypeValuePair()
; | 819 Json::Value jsonActualResults = actualResultDigest.asJsonTypeValuePair()
; |
| 820 if (errors.isEmpty()) { | 820 if (errors.isEmpty()) { |
| 821 this->fJsonActualResults_Succeeded[testName] = jsonActualResults; | 821 this->fJsonActualResults_Succeeded[testName] = jsonActualResults; |
| 822 } else { | 822 } else { |
| 823 if (ignoreFailure) { | 823 if (ignoreFailure) { |
| 824 // TODO: Once we have added the ability to compare | |
| 825 // actual results against expectations in a JSON file | |
| 826 // (where we can set ignore-failure to either true or | |
| 827 // false), add test cases that exercise ignored | |
| 828 // failures (both for kMissingExpectations_ErrorType | |
| 829 // and kExpectationsMismatch_ErrorType). | |
| 830 this->fJsonActualResults_FailureIgnored[testName] = | 824 this->fJsonActualResults_FailureIgnored[testName] = |
| 831 jsonActualResults; | 825 jsonActualResults; |
| 832 } else { | 826 } else { |
| 833 if (errors.includes(kMissingExpectations_ErrorType)) { | 827 if (errors.includes(kMissingExpectations_ErrorType)) { |
| 834 // TODO: What about the case where there IS an | 828 // TODO: What about the case where there IS an |
| 835 // expected image hash digest, but that gm test | 829 // expected image hash digest, but that gm test |
| 836 // doesn't actually run? For now, those cases | 830 // doesn't actually run? For now, those cases |
| 837 // will always be ignored, because gm only looks | 831 // will always be ignored, because gm only looks |
| 838 // at expectations that correspond to gm tests | 832 // at expectations that correspond to gm tests |
| 839 // that were actually run. | 833 // that were actually run. |
| (...skipping 1465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2305 if (FLAGS_forceBWtext) { | 2299 if (FLAGS_forceBWtext) { |
| 2306 canvas->setDrawFilter(SkNEW(BWTextDrawFilter))->unref(); | 2300 canvas->setDrawFilter(SkNEW(BWTextDrawFilter))->unref(); |
| 2307 } | 2301 } |
| 2308 } | 2302 } |
| 2309 | 2303 |
| 2310 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) | 2304 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) |
| 2311 int main(int argc, char * const argv[]) { | 2305 int main(int argc, char * const argv[]) { |
| 2312 return tool_main(argc, (char**) argv); | 2306 return tool_main(argc, (char**) argv); |
| 2313 } | 2307 } |
| 2314 #endif | 2308 #endif |
| OLD | NEW |