DM: fix failures when using -r by comparing unpremultiplied.

PNGs store unpremultiplied colors, so we have to convert back and forth with
SkBitmap.  This is lossy.  GM solves this problem by stripping the alpha
channel before writing the PNG.

This flips it around, converting the GM's output to unpremultiplied as needed.  This way each pixel goes from premul to unpremul once, never back.

Tested:
out/Release/dm -w /tmp/w --config 565 8888 gpu
out/Release/dm -r /tmp/w --config 565 8888 gpu
BUG=
R=bsalomon@google.com

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/122923003

git-svn-id: http://skia.googlecode.com/svn/trunk@12926 2bbb7eff-a529-9590-31e7-b0007b416f81
1 file changed