blob: c95f93346a2de425faa9a757b342b52d33707d5e [file] [log] [blame]
mtklein@google.comd36522d2013-10-16 13:02:15 +00001#ifndef DMUtil_DEFINED
2#define DMUtil_DEFINED
3
commit-bot@chromium.org66bb3d12013-10-16 19:13:38 +00004#include "SkBitmap.h"
mtklein@google.comd36522d2013-10-16 13:02:15 +00005#include "SkString.h"
6#include "gm_expectations.h"
7
8// Small free functions used in more than one place in DM.
9
10namespace DM {
11
12// underJoin("a", "b") -> "a_b"
13SkString underJoin(const char* a, const char* b);
14
15// png("a") -> "a.png"
16SkString png(SkString s);
17
commit-bot@chromium.org66bb3d12013-10-16 19:13:38 +000018// Roughly, expectations.match(GmResultDigest(bitmap)), but calculates the digest lazily.
19bool meetsExpectations(const skiagm::Expectations& expectations, const SkBitmap bitmap);
mtklein@google.comd36522d2013-10-16 13:02:15 +000020
21} // namespace DM
22
23#endif // DMUtil_DEFINED