DM: duh, don't calculate digests unless we're going to look at them.

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
diff --git a/dm/DMUtil.cpp b/dm/DMUtil.cpp
index 803c338..dc652eb 100644
--- a/dm/DMUtil.cpp
+++ b/dm/DMUtil.cpp
@@ -13,11 +13,12 @@
     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