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

Unified Diff: tools/skimage_main.cpp

Issue 15883004: GM: create GmResultDigest that encapsulates digest type ("bitmap-64bitMD5") and value (12345) (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: add_isValid Created 7 years, 7 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
« no previous file with comments | « tests/BitmapHasherTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/skimage_main.cpp
===================================================================
--- tools/skimage_main.cpp (revision 9256)
+++ tools/skimage_main.cpp (working copy)
@@ -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 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 @@
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;
}
« no previous file with comments | « tests/BitmapHasherTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698