OLD | NEW |
1 #include "DMUtil.h" | 1 #include "DMUtil.h" |
2 | 2 |
3 namespace DM { | 3 namespace DM { |
4 | 4 |
5 SkString underJoin(const char* a, const char* b) { | 5 SkString underJoin(const char* a, const char* b) { |
6 SkString s; | 6 SkString s; |
7 s.appendf("%s_%s", a, b); | 7 s.appendf("%s_%s", a, b); |
8 return s; | 8 return s; |
9 } | 9 } |
10 | 10 |
11 SkString png(SkString s) { | 11 SkString png(SkString s) { |
12 s.appendf(".png"); | 12 s.appendf(".png"); |
13 return s; | 13 return s; |
14 } | 14 } |
15 | 15 |
16 bool meetsExpectations(const skiagm::Expectations& expectations, | 16 bool meetsExpectations(const skiagm::Expectations& expectations, const SkBitmap
bitmap) { |
17 const skiagm::GmResultDigest& digest) { | 17 if (expectations.ignoreFailure() || expectations.empty()) { |
18 return expectations.ignoreFailure() | 18 return true; |
19 || expectations.empty() | 19 } |
20 || expectations.match(digest); | 20 const skiagm::GmResultDigest digest(bitmap); |
| 21 return expectations.match(digest); |
21 } | 22 } |
22 | 23 |
23 } // namespace DM | 24 } // namespace DM |
OLD | NEW |