DescriptionChange code path for structured cloning ImageBitmap
This is how it works currently:
When an ImageBitmap is un-premultiplied, we read bitmap's pixel data in
premultiplied format. When de-serialize happens, we call
ImageBitmap::create(ImageData*) and in that create() function, we create
an SkImage that is in premultiplied format because the input data is
already premultiplied. This is causing the problem because the SkImage
should be in un-premultiplied format.
We change the implementation like this:
When we serialize the ImageBitmap into uint8_t*, we read the pixel
data according to whether the ImageBitmap is premultiplied or not,
also we store the information whether the bitmap is premultiplied or
not. When de-serialization happens, we design a new ImageBitmap
constructor specifically for it.
Notice that after this change, the layout tests
fast/canvas/webgl/texImage-imageBitmap-structured-clone.html
passes.
BUG=615172
Committed: https://crrev.com/58c08f3acefbd7a44387d03237967a4644130c0f
Cr-Commit-Position: refs/heads/master@{#403475}
Patch Set 1 #Patch Set 2 : rebase #
Total comments: 6
Patch Set 3 : address comments #Patch Set 4 : DEBUG, DONOT COMMIT THIS PS #Patch Set 5 : This PS works, but needs code clean up #Patch Set 6 : clean up code, should work #
Total comments: 12
Patch Set 7 : address comments #
Total comments: 5
Patch Set 8 : address comments #
Total comments: 3
Patch Set 9 : more comments #
Messages
Total messages: 25 (9 generated)
|