Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: dm/DMComparisonTask.cpp

Issue 27476007: DM: duh, don't calculate digests unless we're going to look at them. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: sync and merge Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | dm/DMCpuTask.cpp » ('j') | dm/DMReplayTask.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "DMComparisonTask.h" 1 #include "DMComparisonTask.h"
2 #include "DMUtil.h" 2 #include "DMUtil.h"
3 3
4 namespace DM { 4 namespace DM {
5 5
6 ComparisonTask::ComparisonTask(const Task& parent, 6 ComparisonTask::ComparisonTask(const Task& parent,
7 skiagm::Expectations expectations, 7 skiagm::Expectations expectations,
8 SkBitmap bitmap) 8 SkBitmap bitmap)
9 : Task(parent) 9 : Task(parent)
10 , fName(parent.name()) // Masquerade as parent so failures are attributed t o it. 10 , fName(parent.name()) // Masquerade as parent so failures are attributed t o it.
11 , fExpectations(expectations) 11 , fExpectations(expectations)
12 , fBitmap(bitmap) 12 , fBitmap(bitmap)
13 {} 13 {}
14 14
15 void ComparisonTask::draw() { 15 void ComparisonTask::draw() {
16 const skiagm::GmResultDigest digest(fBitmap); 16 if (!meetsExpectations(fExpectations, fBitmap)) {
17 if (!meetsExpectations(fExpectations, digest)) {
18 this->fail(); 17 this->fail();
19 } 18 }
20 } 19 }
21 20
22 } // namespace DM 21 } // namespace DM
OLDNEW
« no previous file with comments | « no previous file | dm/DMCpuTask.cpp » ('j') | dm/DMReplayTask.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698