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

Unified 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 side-by-side diff with in-line comments
Download patch
« dm/DMReplayTask.h ('K') | « dm/DMUtil.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMUtil.cpp
diff --git a/dm/DMUtil.cpp b/dm/DMUtil.cpp
index 803c338adce932fd3f1244a9af4609bff75ca92e..dc652ebdbed55176db5c5d6f7aa066db3e138918 100644
--- a/dm/DMUtil.cpp
+++ b/dm/DMUtil.cpp
@@ -13,11 +13,12 @@ SkString png(SkString s) {
return s;
}
-bool meetsExpectations(const skiagm::Expectations& expectations,
- const skiagm::GmResultDigest& digest) {
- return expectations.ignoreFailure()
- || expectations.empty()
- || expectations.match(digest);
+bool meetsExpectations(const skiagm::Expectations& expectations, const SkBitmap bitmap) {
+ if (expectations.ignoreFailure() || expectations.empty()) {
+ return true;
+ }
+ const skiagm::GmResultDigest digest(bitmap);
+ return expectations.match(digest);
}
} // namespace DM
« 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