mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 1 | // Main binary for DM. |
| 2 | // For a high-level overview, please see dm/README. |
| 3 | |
tfarina | f168b86 | 2014-06-19 12:32:29 -0700 | [diff] [blame] | 4 | #include "CrashHandler.h" |
mtklein | 72ebb9f | 2014-08-07 14:27:03 -0700 | [diff] [blame] | 5 | #include "LazyDecodeBitmap.h" |
caryclark | 17f0b6d | 2014-07-22 10:15:34 -0700 | [diff] [blame] | 6 | #include "SkCommonFlags.h" |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 7 | #include "SkForceLinking.h" |
| 8 | #include "SkGraphics.h" |
mtklein | 1d0f164 | 2014-09-08 08:05:18 -0700 | [diff] [blame] | 9 | #include "SkOSFile.h" |
commit-bot@chromium.org | 90b5a2a | 2014-05-14 17:55:32 +0000 | [diff] [blame] | 10 | #include "SkPicture.h" |
rmistry@google.com | d6bab02 | 2013-12-02 13:50:38 +0000 | [diff] [blame] | 11 | #include "SkString.h" |
mtklein | 406654b | 2014-09-03 15:34:37 -0700 | [diff] [blame] | 12 | #include "SkTaskGroup.h" |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 13 | #include "Test.h" |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 14 | #include "gm.h" |
Cary Clark | 992c7b0 | 2014-07-31 08:58:44 -0400 | [diff] [blame] | 15 | #include "sk_tool_utils.h" |
| 16 | #include "sk_tool_utils_flags.h" |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 17 | |
commit-bot@chromium.org | ef57b7e | 2014-02-28 20:31:31 +0000 | [diff] [blame] | 18 | #include "DMCpuGMTask.h" |
| 19 | #include "DMGpuGMTask.h" |
commit-bot@chromium.org | 787227d | 2014-03-26 21:26:15 +0000 | [diff] [blame] | 20 | #include "DMGpuSupport.h" |
mtklein | 30bf3e2 | 2014-06-03 13:57:14 -0700 | [diff] [blame] | 21 | #include "DMPDFTask.h" |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 22 | #include "DMReporter.h" |
commit-bot@chromium.org | 90b5a2a | 2014-05-14 17:55:32 +0000 | [diff] [blame] | 23 | #include "DMSKPTask.h" |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 24 | #include "DMTask.h" |
| 25 | #include "DMTaskRunner.h" |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 26 | #include "DMTestTask.h" |
commit-bot@chromium.org | 99589af | 2013-12-10 14:53:16 +0000 | [diff] [blame] | 27 | #include "DMWriteTask.h" |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 28 | |
mtklein | 30bf3e2 | 2014-06-03 13:57:14 -0700 | [diff] [blame] | 29 | #ifdef SK_BUILD_POPPLER |
| 30 | # include "SkPDFRasterizer.h" |
| 31 | # define RASTERIZE_PDF_PROC SkPopplerRasterizePDF |
| 32 | #else |
| 33 | # define RASTERIZE_PDF_PROC NULL |
| 34 | #endif |
| 35 | |
commit-bot@chromium.org | 120c999 | 2014-05-16 18:11:51 +0000 | [diff] [blame] | 36 | #include <ctype.h> |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 37 | |
| 38 | using skiagm::GM; |
| 39 | using skiagm::GMRegistry; |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 40 | using skiatest::Test; |
| 41 | using skiatest::TestRegistry; |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 42 | |
kkinnunen | 80549fc | 2014-06-30 06:36:31 -0700 | [diff] [blame] | 43 | static const char kGpuAPINameGL[] = "gl"; |
| 44 | static const char kGpuAPINameGLES[] = "gles"; |
| 45 | |
commit-bot@chromium.org | 99589af | 2013-12-10 14:53:16 +0000 | [diff] [blame] | 46 | DEFINE_string2(expectations, r, "", |
| 47 | "If a directory, compare generated images against images under this path. " |
commit-bot@chromium.org | 120c999 | 2014-05-16 18:11:51 +0000 | [diff] [blame] | 48 | "If a file, compare generated images against JSON expectations at this path." |
commit-bot@chromium.org | 120c999 | 2014-05-16 18:11:51 +0000 | [diff] [blame] | 49 | ); |
caryclark | 17f0b6d | 2014-07-22 10:15:34 -0700 | [diff] [blame] | 50 | |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 51 | DEFINE_bool(gms, true, "Run GMs?"); |
| 52 | DEFINE_bool(tests, true, "Run tests?"); |
Cary Clark | 992c7b0 | 2014-07-31 08:58:44 -0400 | [diff] [blame] | 53 | DEFINE_bool(reportUsedChars, false, "Output test font construction data to be pasted into" |
| 54 | " create_test_font.cpp."); |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 55 | |
| 56 | __SK_FORCE_IMAGE_DECODER_LINKING; |
| 57 | |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 58 | // "FooBar" -> "foobar". Obviously, ASCII only. |
| 59 | static SkString lowercase(SkString s) { |
| 60 | for (size_t i = 0; i < s.size(); i++) { |
| 61 | s[i] = tolower(s[i]); |
| 62 | } |
| 63 | return s; |
| 64 | } |
| 65 | |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 66 | static const GrContextFactory::GLContextType native = GrContextFactory::kNative_GLContextType; |
mtklein | 60c7707 | 2014-08-14 10:36:55 -0700 | [diff] [blame] | 67 | static const GrContextFactory::GLContextType nvpr = GrContextFactory::kNVPR_GLContextType; |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 68 | static const GrContextFactory::GLContextType null = GrContextFactory::kNull_GLContextType; |
| 69 | static const GrContextFactory::GLContextType debug = GrContextFactory::kDebug_GLContextType; |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 70 | #if SK_ANGLE |
mtklein | 60c7707 | 2014-08-14 10:36:55 -0700 | [diff] [blame] | 71 | static const GrContextFactory::GLContextType angle = GrContextFactory::kANGLE_GLContextType; |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 72 | #endif |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 73 | #if SK_MESA |
mtklein | 60c7707 | 2014-08-14 10:36:55 -0700 | [diff] [blame] | 74 | static const GrContextFactory::GLContextType mesa = GrContextFactory::kMESA_GLContextType; |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 75 | #endif |
| 76 | |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 77 | static void kick_off_gms(const SkTDArray<GMRegistry::Factory>& gms, |
| 78 | const SkTArray<SkString>& configs, |
kkinnunen | 80549fc | 2014-06-30 06:36:31 -0700 | [diff] [blame] | 79 | GrGLStandard gpuAPI, |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 80 | const DM::Expectations& expectations, |
| 81 | DM::Reporter* reporter, |
| 82 | DM::TaskRunner* tasks) { |
mtklein | e4d3e60 | 2014-06-06 09:28:43 -0700 | [diff] [blame] | 83 | #define START(name, type, ...) \ |
| 84 | if (lowercase(configs[j]).equals(name)) { \ |
| 85 | tasks->add(SkNEW_ARGS(DM::type, (name, reporter, tasks, gms[i], ## __VA_ARGS__))); \ |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 86 | } |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 87 | for (int i = 0; i < gms.count(); i++) { |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 88 | for (int j = 0; j < configs.count(); j++) { |
kkinnunen | 80549fc | 2014-06-30 06:36:31 -0700 | [diff] [blame] | 89 | |
mtklein | e4d3e60 | 2014-06-06 09:28:43 -0700 | [diff] [blame] | 90 | START("565", CpuGMTask, expectations, kRGB_565_SkColorType); |
| 91 | START("8888", CpuGMTask, expectations, kN32_SkColorType); |
kkinnunen | 80549fc | 2014-06-30 06:36:31 -0700 | [diff] [blame] | 92 | START("gpu", GpuGMTask, expectations, native, gpuAPI, 0); |
| 93 | START("msaa4", GpuGMTask, expectations, native, gpuAPI, 4); |
| 94 | START("msaa16", GpuGMTask, expectations, native, gpuAPI, 16); |
| 95 | START("nvprmsaa4", GpuGMTask, expectations, nvpr, gpuAPI, 4); |
| 96 | START("nvprmsaa16", GpuGMTask, expectations, nvpr, gpuAPI, 16); |
| 97 | START("gpunull", GpuGMTask, expectations, null, gpuAPI, 0); |
| 98 | START("gpudebug", GpuGMTask, expectations, debug, gpuAPI, 0); |
mtklein | 60c7707 | 2014-08-14 10:36:55 -0700 | [diff] [blame] | 99 | #if SK_ANGLE |
kkinnunen | 80549fc | 2014-06-30 06:36:31 -0700 | [diff] [blame] | 100 | START("angle", GpuGMTask, expectations, angle, gpuAPI, 0); |
mtklein | 60c7707 | 2014-08-14 10:36:55 -0700 | [diff] [blame] | 101 | #endif |
| 102 | #if SK_MESA |
kkinnunen | 80549fc | 2014-06-30 06:36:31 -0700 | [diff] [blame] | 103 | START("mesa", GpuGMTask, expectations, mesa, gpuAPI, 0); |
mtklein | 60c7707 | 2014-08-14 10:36:55 -0700 | [diff] [blame] | 104 | #endif |
mtklein | 30bf3e2 | 2014-06-03 13:57:14 -0700 | [diff] [blame] | 105 | START("pdf", PDFTask, RASTERIZE_PDF_PROC); |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 106 | } |
| 107 | } |
| 108 | #undef START |
| 109 | } |
| 110 | |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 111 | static void kick_off_tests(const SkTDArray<TestRegistry::Factory>& tests, |
| 112 | DM::Reporter* reporter, |
| 113 | DM::TaskRunner* tasks) { |
| 114 | for (int i = 0; i < tests.count(); i++) { |
commit-bot@chromium.org | ef57b7e | 2014-02-28 20:31:31 +0000 | [diff] [blame] | 115 | SkAutoTDelete<Test> test(tests[i](NULL)); |
| 116 | if (test->isGPUTest()) { |
| 117 | tasks->add(SkNEW_ARGS(DM::GpuTestTask, (reporter, tasks, tests[i]))); |
| 118 | } else { |
| 119 | tasks->add(SkNEW_ARGS(DM::CpuTestTask, (reporter, tasks, tests[i]))); |
| 120 | } |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 121 | } |
| 122 | } |
| 123 | |
halcanary | a98683b | 2014-07-28 07:21:24 -0700 | [diff] [blame] | 124 | static void find_skps(SkTArray<SkString>* skps) { |
commit-bot@chromium.org | 90b5a2a | 2014-05-14 17:55:32 +0000 | [diff] [blame] | 125 | if (FLAGS_skps.isEmpty()) { |
| 126 | return; |
| 127 | } |
| 128 | |
| 129 | SkOSFile::Iter it(FLAGS_skps[0], ".skp"); |
| 130 | SkString filename; |
| 131 | while (it.next(&filename)) { |
halcanary | a98683b | 2014-07-28 07:21:24 -0700 | [diff] [blame] | 132 | if (!SkCommandLineFlags::ShouldSkip(FLAGS_match, filename.c_str())) { |
tfarina | a8e2e15 | 2014-07-28 19:26:58 -0700 | [diff] [blame] | 133 | skps->push_back(SkOSPath::Join(FLAGS_skps[0], filename.c_str())); |
commit-bot@chromium.org | 90b5a2a | 2014-05-14 17:55:32 +0000 | [diff] [blame] | 134 | } |
halcanary | a98683b | 2014-07-28 07:21:24 -0700 | [diff] [blame] | 135 | } |
| 136 | } |
commit-bot@chromium.org | 90b5a2a | 2014-05-14 17:55:32 +0000 | [diff] [blame] | 137 | |
halcanary | a98683b | 2014-07-28 07:21:24 -0700 | [diff] [blame] | 138 | static void kick_off_skps(const SkTArray<SkString>& skps, |
mtklein | 23c94f0 | 2014-09-08 09:12:28 -0700 | [diff] [blame^] | 139 | const DM::Expectations& expectations, |
| 140 | DM::Reporter* reporter, |
| 141 | DM::TaskRunner* tasks) { |
halcanary | a98683b | 2014-07-28 07:21:24 -0700 | [diff] [blame] | 142 | for (int i = 0; i < skps.count(); ++i) { |
| 143 | SkAutoTUnref<SkStream> stream(SkStream::NewFromFile(skps[i].c_str())); |
commit-bot@chromium.org | 90b5a2a | 2014-05-14 17:55:32 +0000 | [diff] [blame] | 144 | if (stream.get() == NULL) { |
halcanary | a98683b | 2014-07-28 07:21:24 -0700 | [diff] [blame] | 145 | SkDebugf("Could not read %s.\n", skps[i].c_str()); |
commit-bot@chromium.org | 90b5a2a | 2014-05-14 17:55:32 +0000 | [diff] [blame] | 146 | exit(1); |
| 147 | } |
mtklein | 72ebb9f | 2014-08-07 14:27:03 -0700 | [diff] [blame] | 148 | SkAutoTUnref<SkPicture> pic( |
| 149 | SkPicture::CreateFromStream(stream.get(), &sk_tools::LazyDecodeBitmap)); |
commit-bot@chromium.org | 90b5a2a | 2014-05-14 17:55:32 +0000 | [diff] [blame] | 150 | if (pic.get() == NULL) { |
halcanary | a98683b | 2014-07-28 07:21:24 -0700 | [diff] [blame] | 151 | SkDebugf("Could not read %s as an SkPicture.\n", skps[i].c_str()); |
commit-bot@chromium.org | 90b5a2a | 2014-05-14 17:55:32 +0000 | [diff] [blame] | 152 | exit(1); |
| 153 | } |
| 154 | |
tfarina | a8e2e15 | 2014-07-28 19:26:58 -0700 | [diff] [blame] | 155 | SkString filename = SkOSPath::Basename(skps[i].c_str()); |
mtklein | 23c94f0 | 2014-09-08 09:12:28 -0700 | [diff] [blame^] | 156 | tasks->add(SkNEW_ARGS(DM::SKPTask, (reporter, tasks, expectations, pic, filename))); |
mtklein | d3e474e | 2014-06-27 12:34:44 -0700 | [diff] [blame] | 157 | tasks->add(SkNEW_ARGS(DM::PDFTask, (reporter, tasks, pic, filename, |
mtklein | e4d3e60 | 2014-06-06 09:28:43 -0700 | [diff] [blame] | 158 | RASTERIZE_PDF_PROC))); |
commit-bot@chromium.org | 90b5a2a | 2014-05-14 17:55:32 +0000 | [diff] [blame] | 159 | } |
| 160 | } |
| 161 | |
commit-bot@chromium.org | 39e8d93 | 2014-05-29 20:14:48 +0000 | [diff] [blame] | 162 | static void report_failures(const SkTArray<SkString>& failures) { |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 163 | if (failures.count() == 0) { |
| 164 | return; |
| 165 | } |
| 166 | |
| 167 | SkDebugf("Failures:\n"); |
| 168 | for (int i = 0; i < failures.count(); i++) { |
| 169 | SkDebugf(" %s\n", failures[i].c_str()); |
| 170 | } |
commit-bot@chromium.org | 39e8d93 | 2014-05-29 20:14:48 +0000 | [diff] [blame] | 171 | SkDebugf("%d failures.\n", failures.count()); |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 172 | } |
| 173 | |
kkinnunen | 80549fc | 2014-06-30 06:36:31 -0700 | [diff] [blame] | 174 | static GrGLStandard get_gl_standard() { |
| 175 | if (FLAGS_gpuAPI.contains(kGpuAPINameGL)) { |
| 176 | return kGL_GrGLStandard; |
| 177 | } |
| 178 | if (FLAGS_gpuAPI.contains(kGpuAPINameGLES)) { |
| 179 | return kGLES_GrGLStandard; |
| 180 | } |
| 181 | return kNone_GrGLStandard; |
| 182 | } |
| 183 | |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 184 | template <typename T, typename Registry> |
| 185 | static void append_matching_factories(Registry* head, SkTDArray<typename Registry::Factory>* out) { |
| 186 | for (const Registry* reg = head; reg != NULL; reg = reg->next()) { |
| 187 | SkAutoTDelete<T> forName(reg->factory()(NULL)); |
| 188 | if (!SkCommandLineFlags::ShouldSkip(FLAGS_match, forName->getName())) { |
| 189 | *out->append() = reg->factory(); |
| 190 | } |
| 191 | } |
| 192 | } |
| 193 | |
caryclark | 17f0b6d | 2014-07-22 10:15:34 -0700 | [diff] [blame] | 194 | int dm_main(); |
| 195 | int dm_main() { |
mtklein | 30e6e2a | 2014-06-18 11:44:15 -0700 | [diff] [blame] | 196 | SetupCrashHandler(); |
commit-bot@chromium.org | 39e8d93 | 2014-05-29 20:14:48 +0000 | [diff] [blame] | 197 | SkAutoGraphics ag; |
mtklein | 406654b | 2014-09-03 15:34:37 -0700 | [diff] [blame] | 198 | SkTaskGroup::Enabler enabled(FLAGS_threads); |
commit-bot@chromium.org | a65e2fd | 2014-05-30 17:23:31 +0000 | [diff] [blame] | 199 | |
| 200 | if (FLAGS_dryRun) { |
| 201 | FLAGS_verbose = true; |
| 202 | } |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 203 | #if SK_ENABLE_INST_COUNT |
| 204 | gPrintInstCount = FLAGS_leaks; |
| 205 | #endif |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 206 | |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 207 | SkTArray<SkString> configs; |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 208 | for (int i = 0; i < FLAGS_config.count(); i++) { |
| 209 | SkStrSplit(FLAGS_config[i], ", ", &configs); |
| 210 | } |
| 211 | |
kkinnunen | 80549fc | 2014-06-30 06:36:31 -0700 | [diff] [blame] | 212 | GrGLStandard gpuAPI = get_gl_standard(); |
| 213 | |
mtklein | 1d0f164 | 2014-09-08 08:05:18 -0700 | [diff] [blame] | 214 | SkAutoTDelete<DM::Expectations> expectations(SkNEW(DM::Expectations)); |
| 215 | if (FLAGS_expectations.count() > 0) { |
| 216 | expectations.reset(DM::WriteTask::Expectations::Create(FLAGS_expectations[0])); |
| 217 | if (!expectations.get()) { |
| 218 | return 1; |
| 219 | } |
| 220 | } |
| 221 | |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 222 | SkTDArray<GMRegistry::Factory> gms; |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 223 | if (FLAGS_gms) { |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 224 | append_matching_factories<GM>(GMRegistry::Head(), &gms); |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 225 | } |
| 226 | |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 227 | SkTDArray<TestRegistry::Factory> tests; |
| 228 | if (FLAGS_tests) { |
| 229 | append_matching_factories<Test>(TestRegistry::Head(), &tests); |
| 230 | } |
| 231 | |
halcanary | a98683b | 2014-07-28 07:21:24 -0700 | [diff] [blame] | 232 | SkTArray<SkString> skps; |
| 233 | find_skps(&skps); |
| 234 | |
| 235 | SkDebugf("%d GMs x %d configs, %d tests, %d pictures\n", |
| 236 | gms.count(), configs.count(), tests.count(), skps.count()); |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 237 | DM::Reporter reporter; |
mtklein | 406654b | 2014-09-03 15:34:37 -0700 | [diff] [blame] | 238 | |
| 239 | DM::TaskRunner tasks; |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 240 | kick_off_tests(tests, &reporter, &tasks); |
mtklein | 36ea6c8 | 2014-08-05 07:19:46 -0700 | [diff] [blame] | 241 | kick_off_gms(gms, configs, gpuAPI, *expectations, &reporter, &tasks); |
mtklein | 23c94f0 | 2014-09-08 09:12:28 -0700 | [diff] [blame^] | 242 | kick_off_skps(skps, *expectations, &reporter, &tasks); |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 243 | tasks.wait(); |
| 244 | |
mtklein | 1d0f164 | 2014-09-08 08:05:18 -0700 | [diff] [blame] | 245 | DM::WriteTask::DumpJson(); |
| 246 | |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 247 | SkDebugf("\n"); |
Cary Clark | 992c7b0 | 2014-07-31 08:58:44 -0400 | [diff] [blame] | 248 | #ifdef SK_DEBUG |
| 249 | if (FLAGS_portableFonts && FLAGS_reportUsedChars) { |
| 250 | sk_tool_utils::report_used_chars(); |
| 251 | } |
| 252 | #endif |
mtklein | 9200758 | 2014-08-01 07:46:52 -0700 | [diff] [blame] | 253 | |
commit-bot@chromium.org | 39e8d93 | 2014-05-29 20:14:48 +0000 | [diff] [blame] | 254 | SkTArray<SkString> failures; |
| 255 | reporter.getFailures(&failures); |
| 256 | report_failures(failures); |
| 257 | return failures.count() > 0; |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 258 | } |
commit-bot@chromium.org | 846872f | 2013-10-16 18:21:03 +0000 | [diff] [blame] | 259 | |
| 260 | #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) |
| 261 | int main(int argc, char** argv) { |
caryclark | 17f0b6d | 2014-07-22 10:15:34 -0700 | [diff] [blame] | 262 | SkCommandLineFlags::Parse(argc, argv); |
| 263 | return dm_main(); |
commit-bot@chromium.org | 846872f | 2013-10-16 18:21:03 +0000 | [diff] [blame] | 264 | } |
| 265 | #endif |