Fix alpha pre-multiplication error with custom cursor images

Blink provides custom cursor images in alpha premultiplied form
while the platform cursor code assumes that the raw image data
will not be pre-multiplied. Skia is now pre-multiply aware, but
the pickle format use for serializing the skia images over IPC
has no notion of pre-multiplication. This fix solves the issue
by converting the bimaps to unpremultiplied form prior to
serialization. The skia image info of the source image is checked
to determine whether conversion is necessary.

BUG=432043
TEST=content_unittest WebCursorTest.AlphaConversion
R=jochen@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#340097}
2 files changed