Fixes for unpremul decode.

SkImageDecoder_CG.cpp:
If a non opaque bitmap was decoded, and the caller wants
unpremultiplied, unpremultiply the colors.

Always use the RGB colorspace, since the other colorspaces
do not match the desired bitmap format.

ImageDecodingTest:
Allow for a difference of 1 in each color component when comparing
the result of premultiplying the unpremultiplied decode with the
premultiplied decode, since I found an image (in WEBP format) where
the unpremultiplied colors did not compare perfectly in my comparison.

R=reed@google.com

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

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