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

Unified Diff: gm/gmmain.cpp

Issue 14265010: Make SkSHA1 and SkM5 use common SkDigestHash result type (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: switch_to_MD5 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
Index: gm/gmmain.cpp
===================================================================
--- gm/gmmain.cpp (revision 8685)
+++ gm/gmmain.cpp (working copy)
@@ -714,11 +714,10 @@
const char renderModeDescriptor[],
bool addToJsonSummary) {
ErrorCombination errors;
- SkHashDigest actualBitmapHash;
- // TODO(epoger): Better handling for error returned by ComputeDigest()?
- // For now, we just report a digest of 0 in error cases, like before.
+ BITMAP_HASH_TYPE actualBitmapHash;
if (!SkBitmapHasher::ComputeDigest(actualBitmap, &actualBitmapHash)) {
epoger 2013/04/18 18:07:13 Unlike SkData objects, SkHashDigest objects are mu
- actualBitmapHash = 0;
+ // TODO(epoger): Better handling for error returned by ComputeDigest()?
+ // For now, we just leave actualBitmapHash empty.
}
SkString completeNameString = baseNameString;
completeNameString.append(renderModeDescriptor);
@@ -768,7 +767,7 @@
* depending on status.
*/
void add_actual_results_to_json_summary(const char testName[],
- const SkHashDigest& actualBitmapHash,
+ const BITMAP_HASH_TYPE& actualBitmapHash,
ErrorCombination result,
bool ignoreFailure) {
Json::Value actualResults;
@@ -864,11 +863,10 @@
} else {
// If we are running without expectations, we still want to
// record the actual results.
- SkHashDigest actualBitmapHash;
- // TODO(epoger): Better handling for error returned by ComputeDigest()?
- // For now, we just report a digest of 0 in error cases, like before.
+ BITMAP_HASH_TYPE actualBitmapHash;
if (!SkBitmapHasher::ComputeDigest(actualBitmap, &actualBitmapHash)) {
- actualBitmapHash = 0;
+ // TODO(epoger): Better handling for error returned by ComputeDigest()?
+ // For now, we just leave actualBitmapHash empty.
}
add_actual_results_to_json_summary(name.c_str(), actualBitmapHash,
ErrorCombination(kMissingExpectations_ErrorType),

Powered by Google App Engine
This is Rietveld 408576698