66bb3d1f5e
This doesn't cut the runtime significantly (~6s either way) but it does cut the CPU time down from ~10s to ~6s. BUG= R=bungeman@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/27476007 git-svn-id: http://skia.googlecode.com/svn/trunk@11826 2bbb7eff-a529-9590-31e7-b0007b416f81
25 lines
509 B
C++
25 lines
509 B
C++
#include "DMUtil.h"
|
|
|
|
namespace DM {
|
|
|
|
SkString underJoin(const char* a, const char* b) {
|
|
SkString s;
|
|
s.appendf("%s_%s", a, b);
|
|
return s;
|
|
}
|
|
|
|
SkString png(SkString s) {
|
|
s.appendf(".png");
|
|
return s;
|
|
}
|
|
|
|
bool meetsExpectations(const skiagm::Expectations& expectations, const SkBitmap bitmap) {
|
|
if (expectations.ignoreFailure() || expectations.empty()) {
|
|
return true;
|
|
}
|
|
const skiagm::GmResultDigest digest(bitmap);
|
|
return expectations.match(digest);
|
|
}
|
|
|
|
} // namespace DM
|