aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-05-24 14:33:28 +0000
committerGravatar epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-05-24 14:33:28 +0000
commitd4993ff3605102036f83d5834d9a022d780e5488 (patch)
tree694753d66dc8af18950fbdf6ea9ffc29f4c2005a /tools
parent3e2345a8d56cb76bc43e4421a3e9e3681ecd9eba (diff)
GM: create GmResultDigest that encapsulates digest type ("bitmap-64bitMD5") and value (12345)
R=scroggo@google.com Review URL: https://codereview.chromium.org/15883004 git-svn-id: http://skia.googlecode.com/svn/trunk@9271 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tools')
-rw-r--r--tools/skimage_main.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/tools/skimage_main.cpp b/tools/skimage_main.cpp
index 9739ced49d..f52cf32217 100644
--- a/tools/skimage_main.cpp
+++ b/tools/skimage_main.cpp
@@ -7,7 +7,6 @@
#include "gm_expectations.h"
#include "SkBitmap.h"
-#include "SkBitmapHasher.h"
#include "SkColorPriv.h"
#include "SkCommandLineFlags.h"
#include "SkData.h"
@@ -180,7 +179,7 @@ static SkIRect generate_random_rect(SkRandom* rand, int32_t maxX, int32_t maxY)
static Json::Value gExpectationsToWrite;
/**
- * If expectations are to be recorded, record the expected checksum of bitmap into global
+ * If expectations are to be recorded, record the bitmap expectations into global
* expectations array.
*/
static void write_expectations(const SkBitmap& bitmap, const char* filename) {
@@ -219,16 +218,16 @@ static bool compare_to_expectations_if_necessary(const SkBitmap& bitmap, const c
return false;
}
- SkHashDigest checksum;
- if (!SkBitmapHasher::ComputeDigest(bitmap, &checksum)) {
+ skiagm::GmResultDigest resultDigest(bitmap);
+ if (!resultDigest.isValid()) {
if (failureArray != NULL) {
- failureArray->push_back().printf("decoded %s, but could not create a checksum.",
+ failureArray->push_back().printf("decoded %s, but could not create a GmResultDigest.",
filename);
}
return false;
}
- if (jsExpectation.match(checksum)) {
+ if (jsExpectation.match(resultDigest)) {
return true;
}