| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 #include "CrashHandler.h" | 8 #include "CrashHandler.h" |
| 9 #include "DMJsonWriter.h" | 9 #include "DMJsonWriter.h" |
| 10 #include "DMSrcSink.h" | 10 #include "DMSrcSink.h" |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 | 436 |
| 437 // The finest-grained unit of work we can run: draw a single Src into a single S
ink, | 437 // The finest-grained unit of work we can run: draw a single Src into a single S
ink, |
| 438 // report any errors, and perhaps write out the output: a .png of the bitmap, or
a raw stream. | 438 // report any errors, and perhaps write out the output: a .png of the bitmap, or
a raw stream. |
| 439 struct Task { | 439 struct Task { |
| 440 Task(const Tagged<Src>& src, const Tagged<Sink>& sink) : src(src), sink(sink
) {} | 440 Task(const Tagged<Src>& src, const Tagged<Sink>& sink) : src(src), sink(sink
) {} |
| 441 const Tagged<Src>& src; | 441 const Tagged<Src>& src; |
| 442 const Tagged<Sink>& sink; | 442 const Tagged<Sink>& sink; |
| 443 | 443 |
| 444 static void Run(Task* task) { | 444 static void Run(Task* task) { |
| 445 SkString name = task->src->name(); | 445 SkString name = task->src->name(); |
| 446 const char* foo = name.c_str(); |
| 447 SkDebugf("%s\n", foo); |
| 446 SkString note; | 448 SkString note; |
| 447 SkString whyBlacklisted = is_blacklisted(task->sink.tag, task->src.tag, | 449 SkString whyBlacklisted = is_blacklisted(task->sink.tag, task->src.tag, |
| 448 task->src.options, name.c_str()
); | 450 task->src.options, name.c_str()
); |
| 449 if (!whyBlacklisted.isEmpty()) { | 451 if (!whyBlacklisted.isEmpty()) { |
| 450 note.appendf(" (--blacklist %s)", whyBlacklisted.c_str()); | 452 note.appendf(" (--blacklist %s)", whyBlacklisted.c_str()); |
| 451 } | 453 } |
| 452 SkString log; | 454 SkString log; |
| 453 WallTimer timer; | 455 WallTimer timer; |
| 454 timer.start(); | 456 timer.start(); |
| 455 if (!FLAGS_dryRun && whyBlacklisted.isEmpty()) { | 457 if (!FLAGS_dryRun && whyBlacklisted.isEmpty()) { |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 } | 757 } |
| 756 return 0; | 758 return 0; |
| 757 } | 759 } |
| 758 | 760 |
| 759 #if !defined(SK_BUILD_FOR_IOS) | 761 #if !defined(SK_BUILD_FOR_IOS) |
| 760 int main(int argc, char** argv) { | 762 int main(int argc, char** argv) { |
| 761 SkCommandLineFlags::Parse(argc, argv); | 763 SkCommandLineFlags::Parse(argc, argv); |
| 762 return dm_main(); | 764 return dm_main(); |
| 763 } | 765 } |
| 764 #endif | 766 #endif |
| OLD | NEW |