blob: 2c862e812e6be042e754c09d825c4020d9178703 [file] [log] [blame]
jcgregorio3b27ade2014-11-13 08:06:40 -08001#include "CrashHandler.h"
mtklein748ca3b2015-01-15 10:56:12 -08002#include "DMJsonWriter.h"
3#include "DMSrcSink.h"
4#include "OverwriteLine.h"
5#include "ProcStats.h"
6#include "SkBBHFactory.h"
caryclark17f0b6d2014-07-22 10:15:34 -07007#include "SkCommonFlags.h"
mtklein@google.comd36522d2013-10-16 13:02:15 +00008#include "SkForceLinking.h"
9#include "SkGraphics.h"
mtklein748ca3b2015-01-15 10:56:12 -080010#include "SkMD5.h"
mtklein1d0f1642014-09-08 08:05:18 -070011#include "SkOSFile.h"
mtklein406654b2014-09-03 15:34:37 -070012#include "SkTaskGroup.h"
commit-bot@chromium.org0dc5bd12014-02-26 16:31:22 +000013#include "Test.h"
mtklein748ca3b2015-01-15 10:56:12 -080014#include "Timer.h"
mtklein@google.comd36522d2013-10-16 13:02:15 +000015
commit-bot@chromium.org0dc5bd12014-02-26 16:31:22 +000016DEFINE_bool(tests, true, "Run tests?");
mtklein748ca3b2015-01-15 10:56:12 -080017DEFINE_string(images, "resources", "Images to decode.");
18//DEFINE_string(src, "gm skp image subset", "Source types to test.");
19DEFINE_string(src, "gm skp", "Source types to test. TEMPORARILY DISABLED");
20DEFINE_bool(nameByHash, false,
21 "If true, write to FLAGS_writePath[0]/<hash>.png instead of "
22 "to FLAGS_writePath[0]/<config>/<sourceType>/<name>.png");
23DEFINE_bool2(pathOpsExtended, x, false, "Run extended pathOps tests.");
24DEFINE_string(matrix, "1 0 0 0 1 0 0 0 1",
25 "Matrix to apply when using 'matrix' in config.");
mtklein82d28432015-01-15 12:46:02 -080026DEFINE_bool(gpu_threading, false, "Allow GPU work to run on multiple threads?");
mtklein@google.comd36522d2013-10-16 13:02:15 +000027
28__SK_FORCE_IMAGE_DECODER_LINKING;
mtklein748ca3b2015-01-15 10:56:12 -080029using namespace DM;
mtklein@google.comd36522d2013-10-16 13:02:15 +000030
mtklein748ca3b2015-01-15 10:56:12 -080031/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
32
33SK_DECLARE_STATIC_MUTEX(gFailuresMutex);
34static SkTArray<SkString> gFailures;
35
36static void fail(ImplicitString err) {
37 SkAutoMutexAcquire lock(gFailuresMutex);
38 SkDebugf("\n\nFAILURE: %s\n\n", err.c_str());
39 gFailures.push_back(err);
halcanary9e398f72015-01-10 11:18:04 -080040}
41
mtklein748ca3b2015-01-15 10:56:12 -080042static int32_t gPending = 0; // Atomic.
43
44static void done(double ms, ImplicitString config, ImplicitString src, ImplicitString name) {
45 SkDebugf("%s(%4dMB %5d) %s\t%s %s %s ", FLAGS_verbose ? "\n" : kSkOverwriteLine
46 , sk_tools::getMaxResidentSetSizeMB()
47 , sk_atomic_dec(&gPending)-1
48 , HumanizeMs(ms).c_str()
49 , config.c_str()
50 , src.c_str()
51 , name.c_str());
mtklein@google.comd36522d2013-10-16 13:02:15 +000052}
53
mtklein748ca3b2015-01-15 10:56:12 -080054/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
mtklein114c3cd2015-01-15 10:15:02 -080055
mtklein748ca3b2015-01-15 10:56:12 -080056template <typename T>
57struct Tagged : public SkAutoTDelete<T> { const char* tag; };
58
59static const bool kMemcpyOK = true;
60
61static SkTArray<Tagged<Src>, kMemcpyOK> gSrcs;
62static SkTArray<Tagged<Sink>, kMemcpyOK> gSinks;
63
64static void push_src(const char* tag, Src* s) {
65 SkAutoTDelete<Src> src(s);
66 if (FLAGS_src.contains(tag) &&
67 !SkCommandLineFlags::ShouldSkip(FLAGS_match, src->name().c_str())) {
68 Tagged<Src>& s = gSrcs.push_back();
69 s.reset(src.detach());
70 s.tag = tag;
mtklein114c3cd2015-01-15 10:15:02 -080071 }
mtklein748ca3b2015-01-15 10:56:12 -080072}
mtklein114c3cd2015-01-15 10:15:02 -080073
mtklein748ca3b2015-01-15 10:56:12 -080074static void gather_srcs() {
75 for (const skiagm::GMRegistry* r = skiagm::GMRegistry::Head(); r; r = r->next()) {
76 push_src("gm", new GMSrc(r->factory()));
77 }
78 if (!FLAGS_skps.isEmpty()) {
79 SkOSFile::Iter it(FLAGS_skps[0], "skp");
80 for (SkString file; it.next(&file); ) {
81 push_src("skp", new SKPSrc(SkOSPath::Join(FLAGS_skps[0], file.c_str())));
mtklein114c3cd2015-01-15 10:15:02 -080082 }
83 }
mtklein748ca3b2015-01-15 10:56:12 -080084 if (!FLAGS_images.isEmpty()) {
85 const char* exts[] = {
86 "bmp", "gif", "jpg", "jpeg", "png", "webp", "ktx", "astc", "wbmp", "ico",
87 "BMP", "GIF", "JPG", "JPEG", "PNG", "WEBP", "KTX", "ASTC", "WBMP", "ICO",
88 };
89 for (size_t i = 0; i < SK_ARRAY_COUNT(exts); i++) {
90 SkOSFile::Iter it(FLAGS_images[0], exts[i]);
91 for (SkString file; it.next(&file); ) {
92 SkString path = SkOSPath::Join(FLAGS_images[0], file.c_str());
93 push_src("image", new ImageSrc(path)); // Decode entire image.
94 push_src("subset", new ImageSrc(path, 5)); // Decode 5 random subsets.
mtklein114c3cd2015-01-15 10:15:02 -080095 }
mtklein709d2c32015-01-15 08:30:25 -080096 }
mtklein709d2c32015-01-15 08:30:25 -080097 }
98}
99
mtklein748ca3b2015-01-15 10:56:12 -0800100static GrGLStandard get_gpu_api() {
101 if (FLAGS_gpuAPI.contains("gl")) { return kGL_GrGLStandard; }
102 if (FLAGS_gpuAPI.contains("gles")) { return kGLES_GrGLStandard; }
103 return kNone_GrGLStandard;
mtklein709d2c32015-01-15 08:30:25 -0800104}
105
mtklein748ca3b2015-01-15 10:56:12 -0800106static void push_sink(const char* tag, Sink* s) {
107 SkAutoTDelete<Sink> sink(s);
108 if (!FLAGS_config.contains(tag)) {
109 return;
mtklein114c3cd2015-01-15 10:15:02 -0800110 }
mtklein748ca3b2015-01-15 10:56:12 -0800111 // Try a noop Src as a canary. If it fails, skip this sink.
112 struct : public Src {
113 Error draw(SkCanvas*) const SK_OVERRIDE { return ""; }
114 SkISize size() const SK_OVERRIDE { return SkISize::Make(16, 16); }
115 Name name() const SK_OVERRIDE { return "noop"; }
116 } noop;
mtklein114c3cd2015-01-15 10:15:02 -0800117
mtklein748ca3b2015-01-15 10:56:12 -0800118 SkBitmap bitmap;
119 SkDynamicMemoryWStream stream;
120 Error err = sink->draw(noop, &bitmap, &stream);
121 if (!err.isEmpty()) {
122 SkDebugf("Skipping %s: %s\n", tag, err.c_str());
mtklein114c3cd2015-01-15 10:15:02 -0800123 return;
124 }
125
mtklein748ca3b2015-01-15 10:56:12 -0800126 Tagged<Sink>& ts = gSinks.push_back();
127 ts.reset(sink.detach());
128 ts.tag = tag;
129}
130
131static bool gpu_supported() {
132#if SK_SUPPORT_GPU
133 return FLAGS_gpu;
134#else
135 return false;
136#endif
137}
138
139static Sink* create_sink(const char* tag) {
140#define SINK(t, sink, ...) if (0 == strcmp(t, tag)) { return new sink(__VA_ARGS__); }
141 if (gpu_supported()) {
mtklein82d28432015-01-15 12:46:02 -0800142 typedef GrContextFactory Gr;
mtklein748ca3b2015-01-15 10:56:12 -0800143 const GrGLStandard api = get_gpu_api();
mtklein82d28432015-01-15 12:46:02 -0800144 SINK("gpunull", GPUSink, Gr::kNull_GLContextType, api, 0, false, FLAGS_gpu_threading);
145 SINK("gpudebug", GPUSink, Gr::kDebug_GLContextType, api, 0, false, FLAGS_gpu_threading);
146 SINK("gpu", GPUSink, Gr::kNative_GLContextType, api, 0, false, FLAGS_gpu_threading);
147 SINK("gpudft", GPUSink, Gr::kNative_GLContextType, api, 0, true, FLAGS_gpu_threading);
148 SINK("msaa4", GPUSink, Gr::kNative_GLContextType, api, 4, false, FLAGS_gpu_threading);
149 SINK("msaa16", GPUSink, Gr::kNative_GLContextType, api, 16, false, FLAGS_gpu_threading);
150 SINK("nvprmsaa4", GPUSink, Gr::kNVPR_GLContextType, api, 4, false, FLAGS_gpu_threading);
151 SINK("nvprmsaa16", GPUSink, Gr::kNVPR_GLContextType, api, 16, false, FLAGS_gpu_threading);
mtklein748ca3b2015-01-15 10:56:12 -0800152 #if SK_ANGLE
mtklein82d28432015-01-15 12:46:02 -0800153 SINK("angle", GPUSink, Gr::kANGLE_GLContextType, api, 0, false, FLAGS_gpu_threading);
mtklein748ca3b2015-01-15 10:56:12 -0800154 #endif
155 #if SK_MESA
mtklein82d28432015-01-15 12:46:02 -0800156 SINK("mesa", GPUSink, Gr::kMESA_GLContextType, api, 0, false, FLAGS_gpu_threading);
mtklein748ca3b2015-01-15 10:56:12 -0800157 #endif
mtklein114c3cd2015-01-15 10:15:02 -0800158 }
mtklein748ca3b2015-01-15 10:56:12 -0800159
160 if (FLAGS_cpu) {
161 SINK("565", RasterSink, kRGB_565_SkColorType);
162 SINK("8888", RasterSink, kN32_SkColorType);
163 // TODO(mtklein): reenable once skiagold can handle .pdf uploads.
164 //SINK("pdf", PDFSink);
165 }
166#undef SINK
167 return NULL;
mtklein114c3cd2015-01-15 10:15:02 -0800168}
169
mtklein748ca3b2015-01-15 10:56:12 -0800170static Sink* create_via(const char* tag, Sink* wrapped) {
171#define VIA(t, via, ...) if (0 == strcmp(t, tag)) { return new via(__VA_ARGS__); }
172 VIA("serialize", ViaSerialization, wrapped);
173
174 VIA("tiles", ViaTiles, 256, 256, NULL, wrapped);
175 VIA("tiles_rt", ViaTiles, 256, 256, new SkRTreeFactory, wrapped);
176
177 const int xp = SkGPipeWriter::kCrossProcess_Flag,
178 sa = xp | SkGPipeWriter::kSharedAddressSpace_Flag;
179 VIA("pipe", ViaPipe, 0, wrapped);
180 VIA("pipe_xp", ViaPipe, xp, wrapped);
181 VIA("pipe_sa", ViaPipe, sa, wrapped);
182
183 if (FLAGS_matrix.count() == 9) {
184 SkMatrix m;
185 for (int i = 0; i < 9; i++) {
186 m[i] = (SkScalar)atof(FLAGS_matrix[i]);
187 }
188 VIA("matrix", ViaMatrix, m, wrapped);
189 }
190#undef VIA
191 return NULL;
mtklein114c3cd2015-01-15 10:15:02 -0800192}
193
mtklein748ca3b2015-01-15 10:56:12 -0800194static void gather_sinks() {
195 for (int i = 0; i < FLAGS_config.count(); i++) {
196 const char* config = FLAGS_config[i];
197 SkTArray<SkString> parts;
198 SkStrSplit(config, "-", &parts);
199
200 Sink* sink = NULL;
201 for (int i = parts.count(); i-- > 0;) {
202 const char* part = parts[i].c_str();
203 Sink* next = (sink == NULL) ? create_sink(part) : create_via(part, sink);
204 if (next == NULL) {
205 SkDebugf("Skipping %s: Don't understand '%s'.\n", config, part);
206 delete sink;
207 sink = NULL;
208 break;
209 }
210 sink = next;
211 }
212 if (sink) {
213 push_sink(config, sink);
mtklein114c3cd2015-01-15 10:15:02 -0800214 }
215 }
216}
mtklein709d2c32015-01-15 08:30:25 -0800217
mtklein748ca3b2015-01-15 10:56:12 -0800218// The finest-grained unit of work we can run: draw a single Src into a single Sink,
219// report any errors, and perhaps write out the output: a .png of the bitmap, or a raw stream.
220struct Task {
221 Task(const Tagged<Src>& src, const Tagged<Sink>& sink) : src(src), sink(sink) {}
222 const Tagged<Src>& src;
223 const Tagged<Sink>& sink;
224
225 static void Run(Task* task) {
226 WallTimer timer;
227 timer.start();
228 if (!FLAGS_dryRun) {
229 SkBitmap bitmap;
230 SkDynamicMemoryWStream stream;
231 Error err = task->sink->draw(*task->src, &bitmap, &stream);
232 if (!err.isEmpty()) {
233 fail(SkStringPrintf("%s %s %s: %s",
234 task->sink.tag,
235 task->src.tag,
236 task->src->name().c_str(),
237 err.c_str()));
238 }
239 if (!FLAGS_writePath.isEmpty()) {
240 const char* ext = task->sink->fileExtension();
241 if (stream.bytesWritten() == 0) {
242 SkMemoryStream pixels(bitmap.getPixels(), bitmap.getSize());
243 WriteToDisk(*task, &pixels, bitmap.getSize(), &bitmap, ext);
244 } else {
245 SkAutoTDelete<SkStreamAsset> data(stream.detachAsStream());
246 WriteToDisk(*task, data, data->getLength(), NULL, ext);
247 }
248 }
249 }
250 timer.end();
251 done(timer.fWall, task->sink.tag, task->src.tag, task->src->name());
252 }
253
254 static void WriteToDisk(const Task& task,
255 SkStream* data, size_t len,
256 const SkBitmap* bitmap,
257 const char* ext) {
258 SkMD5 hash;
259 hash.writeStream(data, len);
260 SkMD5::Digest digest;
261 hash.finish(digest);
262
263 JsonWriter::BitmapResult result;
264 result.name = task.src->name();
265 result.config = task.sink.tag;
266 result.sourceType = task.src.tag;
267 result.ext = ext;
268 for (int i = 0; i < 16; i++) {
269 result.md5.appendf("%02x", digest.data[i]);
270 }
271 JsonWriter::AddBitmapResult(result);
272
273 const char* dir = FLAGS_writePath[0];
274 if (0 == strcmp(dir, "@")) { // Needed for iOS.
275 dir = FLAGS_resourcePath[0];
276 }
277 sk_mkdir(dir);
278
279 SkString path;
280 if (FLAGS_nameByHash) {
281 path = SkOSPath::Join(dir, result.md5.c_str());
282 path.append(".");
283 path.append(ext);
284 if (sk_exists(path.c_str())) {
285 return; // Content-addressed. If it exists already, we're done.
286 }
287 } else {
288 path = SkOSPath::Join(dir, task.sink.tag);
289 sk_mkdir(path.c_str());
290 path = SkOSPath::Join(path.c_str(), task.src.tag);
291 sk_mkdir(path.c_str());
292 path = SkOSPath::Join(path.c_str(), task.src->name().c_str());
293 path.append(".");
294 path.append(ext);
295 }
296
297 SkFILEWStream file(path.c_str());
298 if (!file.isValid()) {
299 fail(SkStringPrintf("Can't open %s for writing.\n", path.c_str()));
300 return;
301 }
302
303 data->rewind();
304 if (bitmap) {
305 // We can't encode A8 bitmaps as PNGs. Convert them to 8888 first.
306 SkBitmap converted;
307 if (bitmap->info().colorType() == kAlpha_8_SkColorType) {
308 if (!bitmap->copyTo(&converted, kN32_SkColorType)) {
309 fail("Can't convert A8 to 8888.\n");
310 return;
311 }
312 bitmap = &converted;
313 }
314 if (!SkImageEncoder::EncodeStream(&file, *bitmap, SkImageEncoder::kPNG_Type, 100)) {
315 fail(SkStringPrintf("Can't encode PNG to %s.\n", path.c_str()));
316 return;
317 }
318 } else {
319 if (!file.writeStream(data, len)) {
320 fail(SkStringPrintf("Can't write to %s.\n", path.c_str()));
321 return;
322 }
323 }
324 }
325};
326
327// Run all tasks in the same enclave serially on the same thread.
328// They can't possibly run concurrently with each other.
329static void run_enclave(SkTArray<Task>* tasks) {
330 for (int i = 0; i < tasks->count(); i++) {
331 Task::Run(tasks->begin() + i);
332 }
333}
334
335/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
336
337// Unit tests don't fit so well into the Src/Sink model, so we give them special treatment.
338
339static struct : public skiatest::Reporter {
340 void onReportFailed(const skiatest::Failure& failure) SK_OVERRIDE {
341 SkString s;
342 failure.getFailureString(&s);
343 fail(s);
344 JsonWriter::AddTestFailure(failure);
345 }
346 bool allowExtendedTest() const SK_OVERRIDE { return FLAGS_pathOpsExtended; }
347 bool verbose() const SK_OVERRIDE { return FLAGS_veryVerbose; }
348} gTestReporter;
349
mtklein82d28432015-01-15 12:46:02 -0800350static SkTArray<SkAutoTDelete<skiatest::Test>, kMemcpyOK> gCPUTests, gGPUTests;
mtklein748ca3b2015-01-15 10:56:12 -0800351
352static void gather_tests() {
353 if (!FLAGS_tests) {
354 return;
355 }
356 for (const skiatest::TestRegistry* r = skiatest::TestRegistry::Head(); r; r = r->next()) {
357 SkAutoTDelete<skiatest::Test> test(r->factory()(NULL));
358 if (SkCommandLineFlags::ShouldSkip(FLAGS_match, test->getName())) {
359 continue;
360 }
mtklein82d28432015-01-15 12:46:02 -0800361
mtklein748ca3b2015-01-15 10:56:12 -0800362 test->setReporter(&gTestReporter);
mtklein82d28432015-01-15 12:46:02 -0800363 if (test->isGPUTest() && gpu_supported()) {
364 gGPUTests.push_back().reset(test.detach());
365 } else if (!test->isGPUTest() && FLAGS_cpu) {
366 gCPUTests.push_back().reset(test.detach());
367 }
mtklein748ca3b2015-01-15 10:56:12 -0800368 }
369}
370
371static void run_test(SkAutoTDelete<skiatest::Test>* t) {
372 WallTimer timer;
373 timer.start();
374 skiatest::Test* test = t->get();
375 if (!FLAGS_dryRun) {
mtklein82d28432015-01-15 12:46:02 -0800376 test->setGrContextFactory(GetThreadLocalGrContextFactory());
mtklein748ca3b2015-01-15 10:56:12 -0800377 test->run();
378 if (!test->passed()) {
379 fail(SkStringPrintf("test %s failed", test->getName()));
380 }
381 }
382 timer.end();
383 done(timer.fWall, "unit", "test", test->getName());
384}
385
386/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
387
jcgregorio3b27ade2014-11-13 08:06:40 -0800388int dm_main();
caryclark17f0b6d2014-07-22 10:15:34 -0700389int dm_main() {
jcgregorio3b27ade2014-11-13 08:06:40 -0800390 SetupCrashHandler();
commit-bot@chromium.org39e8d932014-05-29 20:14:48 +0000391 SkAutoGraphics ag;
mtklein406654b2014-09-03 15:34:37 -0700392 SkTaskGroup::Enabler enabled(FLAGS_threads);
commit-bot@chromium.orga65e2fd2014-05-30 17:23:31 +0000393
mtklein748ca3b2015-01-15 10:56:12 -0800394 gather_srcs();
395 gather_sinks();
396 gather_tests();
commit-bot@chromium.org0dc5bd12014-02-26 16:31:22 +0000397
mtklein82d28432015-01-15 12:46:02 -0800398 gPending = gSrcs.count() * gSinks.count() + gCPUTests.count() + gGPUTests.count();
mtklein748ca3b2015-01-15 10:56:12 -0800399 SkDebugf("%d srcs * %d sinks + %d tests == %d tasks\n",
mtklein82d28432015-01-15 12:46:02 -0800400 gSrcs.count(), gSinks.count(), gCPUTests.count() + gGPUTests.count(), gPending);
mtklein748ca3b2015-01-15 10:56:12 -0800401
402 // We try to exploit as much parallelism as is safe. Most Src/Sink pairs run on any thread,
403 // but Sinks that identify as part of a particular enclave run serially on a single thread.
mtklein82d28432015-01-15 12:46:02 -0800404 // CPU tests run on any thread. GPU tests depend on --gpu_threading.
mtklein748ca3b2015-01-15 10:56:12 -0800405 SkTArray<Task> enclaves[kNumEnclaves];
406 for (int j = 0; j < gSinks.count(); j++) {
407 SkTArray<Task>& tasks = enclaves[gSinks[j]->enclave()];
408 for (int i = 0; i < gSrcs.count(); i++) {
409 tasks.push_back(Task(gSrcs[i], gSinks[j]));
410 }
commit-bot@chromium.org38aeb0f2014-02-26 23:01:57 +0000411 }
412
mtklein748ca3b2015-01-15 10:56:12 -0800413 SK_COMPILE_ASSERT(kAnyThread_Enclave == 0, AnyThreadZero);
414 SkTaskGroup tg;
415 tg.batch( Task::Run, enclaves[0].begin(), enclaves[0].count());
416 tg.batch(run_enclave, enclaves+1, kNumEnclaves-1);
mtklein82d28432015-01-15 12:46:02 -0800417 tg.batch( run_test, gCPUTests.begin(), gCPUTests.count());
418 if (FLAGS_gpu_threading) {
419 tg.batch(run_test, gGPUTests.begin(), gGPUTests.count());
420 } else {
421 for (int i = 0; i < gGPUTests.count(); i++) {
422 run_test(&gGPUTests[i]);
423 }
424 }
mtklein748ca3b2015-01-15 10:56:12 -0800425 tg.wait();
kkinnunen80549fc2014-06-30 06:36:31 -0700426
mtklein748ca3b2015-01-15 10:56:12 -0800427 // At this point we're back in single-threaded land.
428
429 if (!FLAGS_verbose) {
430 SkDebugf("\n");
mtklein@google.comd36522d2013-10-16 13:02:15 +0000431 }
432
mtklein748ca3b2015-01-15 10:56:12 -0800433 JsonWriter::DumpJson();
434
435 if (gFailures.count() > 0) {
436 SkDebugf("Failures:\n");
437 for (int i = 0; i < gFailures.count(); i++) {
438 SkDebugf("\t%s", gFailures[i].c_str());
439 }
440 SkDebugf("%d failures\n", gFailures.count());
441 return 1;
mtklein114c3cd2015-01-15 10:15:02 -0800442 }
mtklein748ca3b2015-01-15 10:56:12 -0800443 if (gPending > 0) {
444 SkDebugf("Hrm, we didn't seem to run everything we intended to! Please file a bug.\n");
445 return 1;
mtklein114c3cd2015-01-15 10:15:02 -0800446 }
mtklein748ca3b2015-01-15 10:56:12 -0800447 return 0;
mtklein@google.comd36522d2013-10-16 13:02:15 +0000448}
jcgregorio3b27ade2014-11-13 08:06:40 -0800449
450#if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL)
451int main(int argc, char** argv) {
452 SkCommandLineFlags::Parse(argc, argv);
453 return dm_main();
454}
455#endif