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
22 lines
535 B
C++
22 lines
535 B
C++
#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
|