blob: bb4e656754325d0b07e52a16a214e87329dba99a [file] [log] [blame]
#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() {
if (!MeetsExpectations(fExpectations, fBitmap)) {
this->fail();
}
}
} // namespace DM