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

Unified Diff: dm/DMReporter.h

Issue 309483003: DM tweaks (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: note Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dm/DM.cpp ('k') | dm/DMReporter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMReporter.h
diff --git a/dm/DMReporter.h b/dm/DMReporter.h
index 3f8e953a71af71e7906f5e7c4bd60f9fa11933e8..f7803dc67fdd76687ab17d5e477b53ff119404ce 100644
--- a/dm/DMReporter.h
+++ b/dm/DMReporter.h
@@ -12,20 +12,19 @@ namespace DM {
class Reporter : SkNoncopyable {
public:
- Reporter() : fStarted(0), fFinished(0) {}
+ Reporter() : fPending(0), fFailed(0) {}
- void start() { sk_atomic_inc(&fStarted); }
- void finish(SkString name, SkMSec timeMs);
+ void taskCreated() { sk_atomic_inc(&fPending); }
+ void taskDestroyed() { sk_atomic_dec(&fPending); }
void fail(SkString msg);
- int32_t started() const { return fStarted; }
- int32_t finished() const { return fFinished; }
- int32_t failed() const;
+ void printStatus(SkString name, SkMSec timeMs) const;
void getFailures(SkTArray<SkString>*) const;
private:
- int32_t fStarted, fFinished;
+ int32_t fPending; // atomic
+ int32_t fFailed; // atomic, == fFailures.count().
mutable SkMutex fMutex; // Guards fFailures.
SkTArray<SkString> fFailures;
« no previous file with comments | « dm/DM.cpp ('k') | dm/DMReporter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698