From e2d4eb70724475035d6148ba279f9cb1c2433564 Mon Sep 17 00:00:00 2001 From: mtklein Date: Mon, 8 Sep 2014 12:42:23 -0700 Subject: Hash .pngs instead of SkBitmaps. This has the nice property of being able to double-check hashes after the fact. mtklein@mtklein ~/skia (hash-png)> md5sum bad/8888/3x3bitmaprect.png deede70ab2f34067d461fb4a93332d4c bad/8888/3x3bitmaprect.png mtklein@mtklein ~/skia (hash-png)> grep 3x3bitmaprect_8888 bad/dm.json "3x3bitmaprect_8888" : "deede70ab2f34067d461fb4a93332d4c", I have checked that no two premultiplied colors map to the same unpremultiplied color (math nerds: unpremultiplication is injective), so a change in premultiplied SkBitmap will always imply a change in the encoded unpremultiplied .png. This means, it's safe to hash .pngs; we won't miss subtle changes. BUG=skia: R=jcgregorio@google.com, stephana@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/549203003 --- gyp/tests.gypi | 1 + 1 file changed, 1 insertion(+) (limited to 'gyp') diff --git a/gyp/tests.gypi b/gyp/tests.gypi index cf78e41f63..15f5d0445b 100644 --- a/gyp/tests.gypi +++ b/gyp/tests.gypi @@ -205,6 +205,7 @@ '../tests/TracingTest.cpp', '../tests/TypefaceTest.cpp', '../tests/UnicodeTest.cpp', + '../tests/UnpremultiplyTest.cpp', '../tests/UtilsTest.cpp', '../tests/WArrayTest.cpp', '../tests/WritePixelsTest.cpp', -- cgit v1.2.3