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

Unified Diff: dm/DMExpectationsTask.cpp

Issue 108963002: DM: Add support for reading a directory of images with --expectations (-r). (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: comments etc Created 7 years 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/DMExpectationsTask.h ('k') | dm/DMGpuTask.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMExpectationsTask.cpp
diff --git a/dm/DMExpectationsTask.cpp b/dm/DMExpectationsTask.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..cb92486269890d8c2567ac4a660b8deb59468605
--- /dev/null
+++ b/dm/DMExpectationsTask.cpp
@@ -0,0 +1,21 @@
+#include "DMExpectationsTask.h"
+#include "DMUtil.h"
+
+namespace DM {
+
+ExpectationsTask::ExpectationsTask(const Task& parent,
+ const Expectations& expectations,
+ SkBitmap bitmap)
+ : Task(parent)
+ , fName(parent.name()) // Masquerade as parent so failures are attributed to it.
+ , fExpectations(expectations)
+ , fBitmap(bitmap)
+ {}
+
+void ExpectationsTask::draw() {
+ if (!fExpectations.check(*this, fBitmap)) {
+ this->fail();
+ }
+}
+
+} // namespace DM
« no previous file with comments | « dm/DMExpectationsTask.h ('k') | dm/DMGpuTask.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698