New issue
Advanced search Search tips

Issue 591263 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

createImageBitmap(HTMLImageElement, premultiplyAlpha=false) should avoid re-decoding

Project Member Reported by xidac...@chromium.org, Mar 2 2016

Issue description

It turns out that in the case of createImageBitmap(HTMLImageElement* img), the SkImage that is embedded under img->cachedImage()->image() has premultiplyAlpha=false. So in this case, there is no need to re-decode it again.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Mar 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2160ae0126d1adc88ec8abe5f97291119cb42d68

commit 2160ae0126d1adc88ec8abe5f97291119cb42d68
Author: xidachen <xidachen@chromium.org>
Date: Wed Mar 02 22:46:01 2016

Fix bug for createImageBitmap(HTMLImageElement, premultiplyAlpha=false)

When creating an ImageBitmap from an HTMLImageElement, it calls the
cropImage() function in ImageBitmap class, and it should not get into
the block of using ImageDecoder, because the SkImage that can be obtained
from image->imageForCurrentFrame() is already un-premultiplied
in the case of HTMLImageElement.

Locally I have WebGL conformance and conformance2 tests that pass
with this change but fail without this change.

BUG= 591263 

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

Cr-Commit-Position: refs/heads/master@{#378864}

[modify] https://crrev.com/2160ae0126d1adc88ec8abe5f97291119cb42d68/third_party/WebKit/Source/core/frame/ImageBitmap.cpp

Status: Fixed (was: Started)

Sign in to add a comment