New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 822724 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Oct 11
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature

Blocking:
issue 634542



Sign in to add a comment

Fix createImageBitmap resize for sRGB gamma wide gamut images

Project Member Reported by zakerinasab@chromium.org, Mar 16 2018

Issue description

Looking at premul/unpremul code in ImageBitmap->GetImageWithAlphaDisposition() it seems that the resize coed path will not work properly for wide gamut ImageBitmaps. We also need layout tests to test this when it is fixed.
 
Summary: Fix createImageBitmap resize for sRGB gamma wide gamut images (was: Fix createImageBitmap resize for wide gamut images)
To be more exact, it works for linear gamma wide gamut images, and we have multiple layout tests to check that in third_party/WebKit/LayoutTests/virtual/color_space/fast/canvas/color-space/canvas-createImageBitmap-XXX.html.

Two scenarios remain:
- sRGB gamma wide gamut images with 8888 pixel storage format, for which the code path should work fine, but we don't have test coverage.
- sRGB gamma wide gamut images with half float pixel storage format, for which I expect the current code path to fail, and we don't have test coverage.

We also need to make sure proper test coverage exist for premul ImageBitmap creation option for wide gamut ImageBitmaps. The code path for premul should be universal as it is using SkColorSpaceXform.
Project Member

Comment 2 by bugdroid1@chromium.org, May 2 2018

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

commit 41fc494c53b5c5f56d05648b1a9f5361f1e91060
Author: Reza.Zakerinasab <zakerinasab@chromium.org>
Date: Wed May 02 21:27:12 2018

Avoid GPU readback in CreateImageBitmap

This change list removes GPU readback from scaling and premul
code path in ImageBitmap and adds a unit test to verify that.

Bug:  740197 , 822724 
Change-Id: Iff74a8cd2d2641b1caab275c22bf3384053b27d2
Reviewed-on: https://chromium-review.googlesource.com/1035790
Reviewed-by: Justin Novosad <junov@chromium.org>
Commit-Queue: Mohammad Reza Zakerinasab <zakerinasab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555558}
[modify] https://crrev.com/41fc494c53b5c5f56d05648b1a9f5361f1e91060/third_party/blink/renderer/core/imagebitmap/image_bitmap.cc
[modify] https://crrev.com/41fc494c53b5c5f56d05648b1a9f5361f1e91060/third_party/blink/renderer/core/imagebitmap/image_bitmap_test.cc

Cc: -junov@chromium.org
Status: Fixed (was: Assigned)
This is fixed now. No further action is needed.

Sign in to add a comment