Index: dm/DMReporter.cpp |
diff --git a/dm/DMReporter.cpp b/dm/DMReporter.cpp |
new file mode 100644 |
index 0000000000000000000000000000000000000000..80466ccf9ef7f53cee7c990ae3f475a5e321d334 |
--- /dev/null |
+++ b/dm/DMReporter.cpp |
@@ -0,0 +1,24 @@ |
+#include "DMReporter.h" |
+ |
+namespace DM { |
+ |
+void Reporter::UpdateStatusLine() const { |
+ SkDebugf("\r\033[K%d / %d, %d failed", this->finished(), this->started(), this->failed()); |
+} |
+ |
+int32_t Reporter::failed() const { |
+ SkAutoMutexAcquire reader(&fMutex); |
+ return fFailures.count(); |
+} |
+ |
+void Reporter::fail(SkString name) { |
+ SkAutoMutexAcquire writer(&fMutex); |
+ fFailures.push_back(name); |
+} |
+ |
+void Reporter::getFailures(SkTArray<SkString>* failures) const { |
+ SkAutoMutexAcquire reader(&fMutex); |
+ *failures = fFailures; |
+} |
+ |
+} // namespace DM |