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 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
980 static void Run(const Task& task) { | 980 static void Run(const Task& task) { |
981 SkString name = task.src->name(); | 981 SkString name = task.src->name(); |
982 | 982 |
983 SkString log; | 983 SkString log; |
984 if (!FLAGS_dryRun) { | 984 if (!FLAGS_dryRun) { |
985 SkBitmap bitmap; | 985 SkBitmap bitmap; |
986 SkDynamicMemoryWStream stream; | 986 SkDynamicMemoryWStream stream; |
987 start(task.sink.tag.c_str(), task.src.tag.c_str(), | 987 start(task.sink.tag.c_str(), task.src.tag.c_str(), |
988 task.src.options.c_str(), name.c_str()); | 988 task.src.options.c_str(), name.c_str()); |
989 Error err = task.sink->draw(*task.src, &bitmap, &stream, &log); | 989 Error err = task.sink->draw(*task.src, &bitmap, &stream, &log); |
| 990 if (!log.isEmpty()) { |
| 991 SkDebugf("%s %s %s %s:\n%s\n", task.sink.tag.c_str() |
| 992 , task.src.tag.c_str() |
| 993 , task.src.options.c_str() |
| 994 , name.c_str() |
| 995 , log.c_str()); |
| 996 } |
990 if (!err.isEmpty()) { | 997 if (!err.isEmpty()) { |
991 if (err.isFatal()) { | 998 if (err.isFatal()) { |
992 fail(SkStringPrintf("%s %s %s %s: %s", | 999 fail(SkStringPrintf("%s %s %s %s: %s", |
993 task.sink.tag.c_str(), | 1000 task.sink.tag.c_str(), |
994 task.src.tag.c_str(), | 1001 task.src.tag.c_str(), |
995 task.src.options.c_str(), | 1002 task.src.options.c_str(), |
996 name.c_str(), | 1003 name.c_str(), |
997 err.c_str())); | 1004 err.c_str())); |
998 } else { | 1005 } else { |
999 done(task.sink.tag.c_str(), task.src.tag.c_str(), | 1006 done(task.sink.tag.c_str(), task.src.tag.c_str(), |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1393 Reporter* reporter, | 1400 Reporter* reporter, |
1394 GrContextFactory* fac
tory); | 1401 GrContextFactory* fac
tory); |
1395 } // namespace skiatest | 1402 } // namespace skiatest |
1396 | 1403 |
1397 #if !defined(SK_BUILD_FOR_IOS) | 1404 #if !defined(SK_BUILD_FOR_IOS) |
1398 int main(int argc, char** argv) { | 1405 int main(int argc, char** argv) { |
1399 SkCommandLineFlags::Parse(argc, argv); | 1406 SkCommandLineFlags::Parse(argc, argv); |
1400 return dm_main(); | 1407 return dm_main(); |
1401 } | 1408 } |
1402 #endif | 1409 #endif |
OLD | NEW |