mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 1 | #include "DMUtil.h" |
| 2 | |
| 3 | namespace DM { |
| 4 | |
| 5 | SkString underJoin(const char* a, const char* b) { |
| 6 | SkString s; |
| 7 | s.appendf("%s_%s", a, b); |
| 8 | return s; |
| 9 | } |
| 10 | |
| 11 | SkString png(SkString s) { |
| 12 | s.appendf(".png"); |
| 13 | return s; |
| 14 | } |
| 15 | |
commit-bot@chromium.org | 66bb3d1 | 2013-10-16 19:13:38 +0000 | [diff] [blame^] | 16 | bool meetsExpectations(const skiagm::Expectations& expectations, const SkBitmap bitmap) { |
| 17 | if (expectations.ignoreFailure() || expectations.empty()) { |
| 18 | return true; |
| 19 | } |
| 20 | const skiagm::GmResultDigest digest(bitmap); |
| 21 | return expectations.match(digest); |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 22 | } |
| 23 | |
| 24 | } // namespace DM |