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

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: address comments 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
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."); 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 8
10 namespace DM { 9 namespace DM {
11 10
12 void Reporter::printStatus(SkString name, SkMSec timeMs) const { 11 void Reporter::printStatus(SkString name, SkMSec timeMs) const {
13 if (FLAGS_quiet) { 12 if (FLAGS_quiet) {
14 return; 13 return;
15 } 14 }
16 15
17 // It's okay if these are a little off---they're just for show---so we can r ead unprotectedly. 16 // 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); 17 const int32_t failed = SK_ANNOTATE_UNPROTECTED_READ(fFailed);
(...skipping 16 matching lines...) Expand all
35 SkAutoMutexAcquire writer(&fMutex); 34 SkAutoMutexAcquire writer(&fMutex);
36 fFailures.push_back(msg); 35 fFailures.push_back(msg);
37 } 36 }
38 37
39 void Reporter::getFailures(SkTArray<SkString>* failures) const { 38 void Reporter::getFailures(SkTArray<SkString>* failures) const {
40 SkAutoMutexAcquire reader(&fMutex); 39 SkAutoMutexAcquire reader(&fMutex);
41 *failures = fFailures; 40 *failures = fFailures;
42 } 41 }
43 42
44 } // namespace DM 43 } // namespace DM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698