Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Side by Side Diff: dm/DMReporter.cpp

Issue 389653004: share dm and command flags (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: sync up with latest dm Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « dm/DM.cpp ('k') | dm/DMTask.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « dm/DM.cpp ('k') | dm/DMTask.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698