New issue
Advanced search Search tips

Issue 615172 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

tex-image-and-sub-image-2d-image-bitmap-structured-clone.html fails

Project Member Reported by xidac...@chromium.org, May 26 2016

Issue description

we need to pass the info whether it is premultiplied or not.
 
Status: Started (was: Assigned)
Project Member

Comment 2 by bugdroid1@chromium.org, 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

Status: Fixed (was: Started)

Sign in to add a comment