| 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 1770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1781 } | 1781 } |
| 1782 | 1782 |
| 1783 const char* shortName = gm->shortName(); | 1783 const char* shortName = gm->shortName(); |
| 1784 if (skip_name(FLAGS_match, shortName)) { | 1784 if (skip_name(FLAGS_match, shortName)) { |
| 1785 SkDELETE(gm); | 1785 SkDELETE(gm); |
| 1786 continue; | 1786 continue; |
| 1787 } | 1787 } |
| 1788 | 1788 |
| 1789 gmsRun++; | 1789 gmsRun++; |
| 1790 SkISize size = gm->getISize(); | 1790 SkISize size = gm->getISize(); |
| 1791 if (FLAGS_verbose) { | 1791 gm_fprintf(stdout, "%sdrawing... %s [%d %d]\n", moduloStr.c_str(), short
Name, |
| 1792 gm_fprintf(stdout, "%sdrawing... %s [%d %d]\n", moduloStr.c_str(), s
hortName, | 1792 size.width(), size.height()); |
| 1793 size.width(), size.height()); | |
| 1794 } | |
| 1795 | 1793 |
| 1796 run_multiple_configs(gmmain, gm, configs, grFactory); | 1794 run_multiple_configs(gmmain, gm, configs, grFactory); |
| 1797 | 1795 |
| 1798 SkBitmap comparisonBitmap; | 1796 SkBitmap comparisonBitmap; |
| 1799 const ConfigData compareConfig = | 1797 const ConfigData compareConfig = |
| 1800 { SkBitmap::kARGB_8888_Config, kRaster_Backend, kDontCare_GLContextT
ype, 0, kRW_ConfigFlag, "comparison", false }; | 1798 { SkBitmap::kARGB_8888_Config, kRaster_Backend, kDontCare_GLContextT
ype, 0, kRW_ConfigFlag, "comparison", false }; |
| 1801 gmmain.generate_image(gm, compareConfig, NULL, &comparisonBitmap, false)
; | 1799 gmmain.generate_image(gm, compareConfig, NULL, &comparisonBitmap, false)
; |
| 1802 | 1800 |
| 1803 // TODO(epoger): only run this if gmmain.generate_image() succeeded? | 1801 // TODO(epoger): only run this if gmmain.generate_image() succeeded? |
| 1804 // Otherwise, what are we comparing against? | 1802 // Otherwise, what are we comparing against? |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1880 if (FLAGS_forceBWtext) { | 1878 if (FLAGS_forceBWtext) { |
| 1881 canvas->setDrawFilter(SkNEW(BWTextDrawFilter))->unref(); | 1879 canvas->setDrawFilter(SkNEW(BWTextDrawFilter))->unref(); |
| 1882 } | 1880 } |
| 1883 } | 1881 } |
| 1884 | 1882 |
| 1885 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) | 1883 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) |
| 1886 int main(int argc, char * const argv[]) { | 1884 int main(int argc, char * const argv[]) { |
| 1887 return tool_main(argc, (char**) argv); | 1885 return tool_main(argc, (char**) argv); |
| 1888 } | 1886 } |
| 1889 #endif | 1887 #endif |
| OLD | NEW |