tex-image-and-sub-image-2d-image-bitmap-structured-clone.html fails |
||
Issue descriptionwe need to pass the info whether it is premultiplied or not.
,
Jul 1 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/58c08f3acefbd7a44387d03237967a4644130c0f commit 58c08f3acefbd7a44387d03237967a4644130c0f Author: xidachen <xidachen@chromium.org> Date: Fri Jul 01 17:10:14 2016 Change 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 Review-Url: https://codereview.chromium.org/2039983002 Cr-Commit-Position: refs/heads/master@{#403475} [modify] https://crrev.com/58c08f3acefbd7a44387d03237967a4644130c0f/third_party/WebKit/LayoutTests/TestExpectations [modify] https://crrev.com/58c08f3acefbd7a44387d03237967a4644130c0f/third_party/WebKit/LayoutTests/fast/canvas/canvas-ImageBitmap-structured-clone.html [modify] https://crrev.com/58c08f3acefbd7a44387d03237967a4644130c0f/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp [modify] https://crrev.com/58c08f3acefbd7a44387d03237967a4644130c0f/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.h [modify] https://crrev.com/58c08f3acefbd7a44387d03237967a4644130c0f/third_party/WebKit/Source/core/frame/ImageBitmap.cpp [modify] https://crrev.com/58c08f3acefbd7a44387d03237967a4644130c0f/third_party/WebKit/Source/core/frame/ImageBitmap.h
,
Jul 1 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by xidac...@chromium.org
, Jun 7 2016