diff options
Diffstat (limited to 'gm/gm_expectations.h')
-rw-r--r-- | gm/gm_expectations.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gm/gm_expectations.h b/gm/gm_expectations.h index 55122d4ab8..ec6899794a 100644 --- a/gm/gm_expectations.h +++ b/gm/gm_expectations.h @@ -76,12 +76,33 @@ namespace skiagm { */ 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 { |