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

Unified Diff: dm/DMWriteTask.h

Issue 546873002: Start to rework DM JSON handling. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: back to one hash Created 6 years, 3 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/DMExpectations.h ('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 15e1300af2d2106921e0d0c10eab32e5891a8577..fad9262c33193ea5881620b93c43d60be524bbcb 100644
--- a/dm/DMWriteTask.h
+++ b/dm/DMWriteTask.h
@@ -4,6 +4,8 @@
#include "DMExpectations.h"
#include "DMTask.h"
#include "SkBitmap.h"
+#include "SkJSONCPP.h"
+#include "SkStream.h"
#include "SkString.h"
#include "SkTArray.h"
@@ -27,19 +29,22 @@ 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.
+ // Reads JSON file WriteTask wrote under root and compares the bitmap with checksums inside.
class Expectations : public DM::Expectations {
public:
- explicit Expectations(const char* root) : fRoot(root) {}
-
+ static Expectations* Create(const char*);
bool check(const Task& task, SkBitmap bitmap) const SK_OVERRIDE;
private:
- const char* fRoot;
+ Expectations() {}
+ Json::Value fJson;
};
+ static void DumpJson();
+
private:
SkTArray<SkString> fSuffixes;
- const SkString fGmName;
+ const SkString fFullName;
+ const SkString fBaseName;
const SkBitmap fBitmap;
SkAutoTDelete<SkStreamAsset> fData;
const char* fExtension;
« no previous file with comments | « dm/DMExpectations.h ('k') | dm/DMWriteTask.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698