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

Unified Diff: gm/gm_expectations.h

Issue 14170010: rename SkBitmapChecksummer as SkBitmapHasher, and prepare for it to possibly use (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: sync_to_r8638 Created 7 years, 8 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 | « no previous file | gm/gmmain.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/gm_expectations.h
===================================================================
--- gm/gm_expectations.h (revision 8638)
+++ gm/gm_expectations.h (working copy)
@@ -10,7 +10,7 @@
#include <stdarg.h>
#include "gm.h"
#include "SkBitmap.h"
-#include "SkBitmapChecksummer.h"
+#include "SkBitmapHasher.h"
#include "SkData.h"
#include "SkImageDecoder.h"
#include "SkOSFile.h"
@@ -94,7 +94,13 @@
Expectations(const SkBitmap& bitmap, bool ignoreFailure=kDefaultIgnoreFailure) {
fBitmap = bitmap;
fIgnoreFailure = ignoreFailure;
- fAllowedChecksums.push_back() = SkBitmapChecksummer::Compute64(bitmap);
+ SkHashDigest digest;
+ // TODO(epoger): Better handling for error returned by ComputeDigest()?
+ // For now, we just report a digest of 0 in error cases, like before.
+ if (!SkBitmapHasher::ComputeDigest(bitmap, &digest)) {
+ digest = 0;
+ }
+ fAllowedChecksums.push_back() = digest;
}
/**
« no previous file with comments | « no previous file | gm/gmmain.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698