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

Side by Side Diff: dm/DMUtil.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
« dm/DMReplayTask.h ('K') | « dm/DMUtil.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "DMUtil.h" 1 #include "DMUtil.h"
2 2
3 namespace DM { 3 namespace DM {
4 4
5 SkString underJoin(const char* a, const char* b) { 5 SkString underJoin(const char* a, const char* b) {
6 SkString s; 6 SkString s;
7 s.appendf("%s_%s", a, b); 7 s.appendf("%s_%s", a, b);
8 return s; 8 return s;
9 } 9 }
10 10
11 SkString png(SkString s) { 11 SkString png(SkString s) {
12 s.appendf(".png"); 12 s.appendf(".png");
13 return s; 13 return s;
14 } 14 }
15 15
16 bool meetsExpectations(const skiagm::Expectations& expectations, 16 bool meetsExpectations(const skiagm::Expectations& expectations, const SkBitmap bitmap) {
17 const skiagm::GmResultDigest& digest) { 17 if (expectations.ignoreFailure() || expectations.empty()) {
18 return expectations.ignoreFailure() 18 return true;
19 || expectations.empty() 19 }
20 || expectations.match(digest); 20 const skiagm::GmResultDigest digest(bitmap);
21 return expectations.match(digest);
21 } 22 }
22 23
23 } // namespace DM 24 } // namespace DM
OLDNEW
« dm/DMReplayTask.h ('K') | « dm/DMUtil.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698