| OLD | NEW |
| 1 #include "CrashHandler.h" | 1 #include "CrashHandler.h" |
| 2 #include "DMJsonWriter.h" | 2 #include "DMJsonWriter.h" |
| 3 #include "DMSrcSink.h" | 3 #include "DMSrcSink.h" |
| 4 #include "DMSrcSinkAndroid.h" | 4 #include "DMSrcSinkAndroid.h" |
| 5 #include "OverwriteLine.h" | 5 #include "OverwriteLine.h" |
| 6 #include "ProcStats.h" | 6 #include "ProcStats.h" |
| 7 #include "SkBBHFactory.h" | 7 #include "SkBBHFactory.h" |
| 8 #include "SkChecksum.h" | 8 #include "SkChecksum.h" |
| 9 #include "SkCommonFlags.h" | 9 #include "SkCommonFlags.h" |
| 10 #include "SkForceLinking.h" | 10 #include "SkForceLinking.h" |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 SkDynamicMemoryWStream stream; | 326 SkDynamicMemoryWStream stream; |
| 327 Error err = task->sink->draw(*task->src, &bitmap, &stream, &log); | 327 Error err = task->sink->draw(*task->src, &bitmap, &stream, &log); |
| 328 if (!err.isEmpty()) { | 328 if (!err.isEmpty()) { |
| 329 timer.end(); | 329 timer.end(); |
| 330 if (err.isFatal()) { | 330 if (err.isFatal()) { |
| 331 fail(SkStringPrintf("%s %s %s: %s", | 331 fail(SkStringPrintf("%s %s %s: %s", |
| 332 task->sink.tag, | 332 task->sink.tag, |
| 333 task->src.tag, | 333 task->src.tag, |
| 334 name.c_str(), | 334 name.c_str(), |
| 335 err.c_str())); | 335 err.c_str())); |
| 336 } else { | 336 } else if (FLAGS_verbose) { |
| 337 name.appendf(" (skipped: %s)", err.c_str()); | 337 name.appendf(" (skipped: %s)", err.c_str()); |
| 338 } | 338 } |
| 339 done(timer.fWall, task->sink.tag, task->src.tag, name, log); | 339 done(timer.fWall, task->sink.tag, task->src.tag, name, log); |
| 340 return; | 340 return; |
| 341 } | 341 } |
| 342 SkAutoTDelete<SkStreamAsset> data(stream.detachAsStream()); | 342 SkAutoTDelete<SkStreamAsset> data(stream.detachAsStream()); |
| 343 | 343 |
| 344 SkString md5; | 344 SkString md5; |
| 345 if (!FLAGS_writePath.isEmpty() || !FLAGS_readPath.isEmpty()) { | 345 if (!FLAGS_writePath.isEmpty() || !FLAGS_readPath.isEmpty()) { |
| 346 SkMD5 hash; | 346 SkMD5 hash; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 371 const char* ext = task->sink->fileExtension(); | 371 const char* ext = task->sink->fileExtension(); |
| 372 if (data->getLength()) { | 372 if (data->getLength()) { |
| 373 WriteToDisk(*task, md5, ext, data, data->getLength(), NULL); | 373 WriteToDisk(*task, md5, ext, data, data->getLength(), NULL); |
| 374 SkASSERT(bitmap.drawsNothing()); | 374 SkASSERT(bitmap.drawsNothing()); |
| 375 } else if (!bitmap.drawsNothing()) { | 375 } else if (!bitmap.drawsNothing()) { |
| 376 WriteToDisk(*task, md5, ext, NULL, 0, &bitmap); | 376 WriteToDisk(*task, md5, ext, NULL, 0, &bitmap); |
| 377 } | 377 } |
| 378 } | 378 } |
| 379 } | 379 } |
| 380 timer.end(); | 380 timer.end(); |
| 381 if (!whyBlacklisted.isEmpty()) { | 381 if (FLAGS_verbose && !whyBlacklisted.isEmpty()) { |
| 382 name.appendf(" (--blacklist, %s)", whyBlacklisted.c_str()); | 382 name.appendf(" (--blacklist, %s)", whyBlacklisted.c_str()); |
| 383 } | 383 } |
| 384 done(timer.fWall, task->sink.tag, task->src.tag, name, log); | 384 done(timer.fWall, task->sink.tag, task->src.tag, name, log); |
| 385 } | 385 } |
| 386 | 386 |
| 387 static void WriteToDisk(const Task& task, | 387 static void WriteToDisk(const Task& task, |
| 388 SkString md5, | 388 SkString md5, |
| 389 const char* ext, | 389 const char* ext, |
| 390 SkStream* data, size_t len, | 390 SkStream* data, size_t len, |
| 391 const SkBitmap* bitmap) { | 391 const SkBitmap* bitmap) { |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 } | 578 } |
| 579 return 0; | 579 return 0; |
| 580 } | 580 } |
| 581 | 581 |
| 582 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) | 582 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) |
| 583 int main(int argc, char** argv) { | 583 int main(int argc, char** argv) { |
| 584 SkCommandLineFlags::Parse(argc, argv); | 584 SkCommandLineFlags::Parse(argc, argv); |
| 585 return dm_main(); | 585 return dm_main(); |
| 586 } | 586 } |
| 587 #endif | 587 #endif |
| OLD | NEW |