Reland r9682, using new SkString::appendU64()
Review URL: https://codereview.chromium.org/17157005
git-svn-id: http://skia.googlecode.com/svn/trunk@9687 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gm/gm_expectations.h b/gm/gm_expectations.h
index 55122d4..ec68997 100644
--- a/gm/gm_expectations.h
+++ b/gm/gm_expectations.h
@@ -76,12 +76,33 @@
*/
Json::Value asJsonTypeValuePair() const;
+ /**
+ * Returns the hashtype, such as "bitmap-64bitMD5", as an SkString.
+ */
+ SkString getHashType() const;
+
+ /**
+ * Returns the hash digest value, such as "12345", as an SkString.
+ */
+ SkString getDigestValue() const;
+
private:
bool fIsValid; // always check this first--if it's false, other fields are meaningless
uint64_t fHashDigest;
};
/**
+ * Encapsulates an SkBitmap and its GmResultDigest, guaranteed to keep them in sync.
+ */
+ class BitmapAndDigest {
+ public:
+ BitmapAndDigest(const SkBitmap &bitmap) : fBitmap(bitmap), fDigest(bitmap) {}
+
+ const SkBitmap fBitmap;
+ const GmResultDigest fDigest;
+ };
+
+ /**
* Test expectations (allowed image results, etc.)
*/
class Expectations {