DescriptionHash .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:
Committed: https://skia.googlesource.com/skia/+/e2d4eb70724475035d6148ba279f9cb1c2433564
Patch Set 1 #Patch Set 2 : test #Patch Set 3 : comment #Patch Set 4 : gypi #
Messages
Total messages: 10 (2 generated)
|