Implement ImageBitmap options premultiplyAlpha for ImageData
With premultiplyAlpha=true, the implementation of this function creates
a premultiplied SkSurface and grab a snapshot from it.
To prevent any data loss, we should try to create a SkImage directly from
the raw unpremultiplied data. There are several tricky cases here. First,
we need to take care of the case when the crop region is not the same as
the original ImageData size, where we need to malloc a temporary buffer
and copy the data over. Also, we need to take care of the case when flipY
is set to be true, because we need to only flip the area that is inside
the crop region.
BUG=589131
Review URL: https://codereview.chromium.org/1680173003
Cr-Commit-Position: refs/heads/master@{#378080}