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

Side by Side Diff: dm/DMReporter.h

Issue 179403010: Revert of Let DM run unit tests. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 9 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/DMGpuTask.cpp ('k') | dm/DMReporter.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 #ifndef DMReporter_DEFINED 1 #ifndef DMReporter_DEFINED
2 #define DMReporter_DEFINED 2 #define DMReporter_DEFINED
3 3
4 #include "SkString.h" 4 #include "SkString.h"
5 #include "SkTArray.h" 5 #include "SkTArray.h"
6 #include "SkThread.h" 6 #include "SkThread.h"
7 #include "SkTypes.h" 7 #include "SkTypes.h"
8 8
9 // Used to report status changes including failures. All public methods are thr eadsafe. 9 // Used to report status changes including failures. All public methods are thr eadsafe.
10
10 namespace DM { 11 namespace DM {
11 12
12 class Reporter : SkNoncopyable { 13 class Reporter : SkNoncopyable {
13 public: 14 public:
14 Reporter() : fStarted(0), fFinished(0) {} 15 Reporter() : fStarted(0), fFinished(0) {}
15 16
16 void start() { sk_atomic_inc(&fStarted); } 17 void start() { sk_atomic_inc(&fStarted); }
17 void finish(SkString name); 18 void finish() { sk_atomic_inc(&fFinished); }
18 void fail(SkString msg); 19 void fail(SkString name);
19 20
20 int32_t started() const { return fStarted; } 21 int32_t started() const { return fStarted; }
21 int32_t finished() const { return fFinished; } 22 int32_t finished() const { return fFinished; }
22 int32_t failed() const; 23 int32_t failed() const;
23 24
25 void updateStatusLine() const;
26
24 void getFailures(SkTArray<SkString>*) const; 27 void getFailures(SkTArray<SkString>*) const;
25 28
26 private: 29 private:
27 int32_t fStarted, fFinished; 30 int32_t fStarted, fFinished;
28 31
29 mutable SkMutex fMutex; // Guards fFailures. 32 mutable SkMutex fMutex; // Guards fFailures.
30 SkTArray<SkString> fFailures; 33 SkTArray<SkString> fFailures;
31 }; 34 };
32 35
33 36
34 } // namespace DM 37 } // namespace DM
35 38
36 #endif // DMReporter_DEFINED 39 #endif // DMReporter_DEFINED
OLDNEW
« no previous file with comments | « dm/DMGpuTask.cpp ('k') | dm/DMReporter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698