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

Unified Diff: dm/DMWriteTask.h

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/DMUtil.cpp ('k') | dm/DMWriteTask.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMWriteTask.h
diff --git a/dm/DMWriteTask.h b/dm/DMWriteTask.h
index 82a26bc928bb7215c7ba1f03478c4b6c2f4a00ff..49a5c746a64fbed20a2ec6bb26860d349af58130 100644
--- a/dm/DMWriteTask.h
+++ b/dm/DMWriteTask.h
@@ -1,11 +1,13 @@
#ifndef DMWriteTask_DEFINED
#define DMWriteTask_DEFINED
+#include "DMExpectations.h"
#include "DMTask.h"
#include "SkBitmap.h"
#include "SkString.h"
#include "SkTArray.h"
+
// Writes a bitmap to a file.
namespace DM {
@@ -21,6 +23,16 @@ public:
virtual bool shouldSkip() const SK_OVERRIDE;
virtual SkString name() const SK_OVERRIDE;
+ // Reads image files WriteTask wrote under root and compares them with bitmap.
+ class Expectations : public DM::Expectations {
+ public:
+ explicit Expectations(const char* root) : fRoot(root) {}
+
+ bool check(const Task& task, SkBitmap bitmap) const SK_OVERRIDE;
+ private:
+ const char* fRoot;
+ };
+
private:
SkTArray<SkString> fSuffixes;
SkString fGmName;
« no previous file with comments | « dm/DMUtil.cpp ('k') | dm/DMWriteTask.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698