OLD | NEW |
1 #include "DMReporter.h" | 1 #include "DMReporter.h" |
2 | 2 |
3 #include "SkDynamicAnnotations.h" | 3 #include "SkDynamicAnnotations.h" |
4 #include "SkCommandLineFlags.h" | 4 #include "SkCommonFlags.h" |
5 #include "OverwriteLine.h" | 5 #include "OverwriteLine.h" |
6 | 6 |
7 DEFINE_bool2(quiet, q, false, "If true, don't print status updates."); | |
8 DEFINE_bool2(verbose, v, false, "If true, print status updates one-per-line."); | |
9 | |
10 namespace DM { | 7 namespace DM { |
11 | 8 |
12 void Reporter::printStatus(SkString name, SkMSec timeMs) const { | 9 void Reporter::printStatus(SkString name, SkMSec timeMs) const { |
13 if (FLAGS_quiet) { | 10 if (FLAGS_quiet) { |
14 return; | 11 return; |
15 } | 12 } |
16 | 13 |
17 // It's okay if these are a little off---they're just for show---so we can r
ead unprotectedly. | 14 // It's okay if these are a little off---they're just for show---so we can r
ead unprotectedly. |
18 const int32_t failed = SK_ANNOTATE_UNPROTECTED_READ(fFailed); | 15 const int32_t failed = SK_ANNOTATE_UNPROTECTED_READ(fFailed); |
19 const int32_t pending = SK_ANNOTATE_UNPROTECTED_READ(fPending) - 1; | 16 const int32_t pending = SK_ANNOTATE_UNPROTECTED_READ(fPending) - 1; |
(...skipping 15 matching lines...) Expand all Loading... |
35 SkAutoMutexAcquire writer(&fMutex); | 32 SkAutoMutexAcquire writer(&fMutex); |
36 fFailures.push_back(msg); | 33 fFailures.push_back(msg); |
37 } | 34 } |
38 | 35 |
39 void Reporter::getFailures(SkTArray<SkString>* failures) const { | 36 void Reporter::getFailures(SkTArray<SkString>* failures) const { |
40 SkAutoMutexAcquire reader(&fMutex); | 37 SkAutoMutexAcquire reader(&fMutex); |
41 *failures = fFailures; | 38 *failures = fFailures; |
42 } | 39 } |
43 | 40 |
44 } // namespace DM | 41 } // namespace DM |
OLD | NEW |