blob: f4f742c921077da558e0cad60cc6ea5569fcd0c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include "DMComparisonTask.h"
#include "DMUtil.h"
namespace DM {
ComparisonTask::ComparisonTask(const Task& parent,
skiagm::Expectations expectations,
SkBitmap bitmap)
: Task(parent)
, fName(parent.name()) // Masquerade as parent so failures are attributed to it.
, fExpectations(expectations)
, fBitmap(bitmap)
{}
void ComparisonTask::draw() {
const skiagm::GmResultDigest digest(fBitmap);
if (!meetsExpectations(fExpectations, digest)) {
this->fail();
}
}
} // namespace DM
|