Fix color type checks in canvas color management code |
|||||
Issue descriptionThere are a couple of locations in Blink->Canvas code that we use the linearity of the gamma transfer function to decide about the storage pixel format or color type. That is, when the color space is linear, we assume half float storage is used. This is incorrect, even though it works for now. It will fail when extended sRGB is added to the canvas proposal. For software images, can do that by looking at the SkImageInfo of the SkPixmap of the SkImage. For GPU-backed images, it seems that there is no good way to do that. Find a solution for GPU-backed images and fix the code accordingly.
,
Feb 12 2018
,
Mar 7 2018
,
Mar 7 2018
,
Apr 27 2018
SkImage now has a colorType() member. We should be able to use this to fix this bug.
,
Apr 30 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/fe3eeccd2c79596b24ab6bb62014068f92dec81d commit fe3eeccd2c79596b24ab6bb62014068f92dec81d Author: Reza.Zakerinasab <zakerinasab@chromium.org> Date: Mon Apr 30 15:00:09 2018 Fix color type checks in canvas color management code In canvas color management code we used gamma linearity of the color space of the image to detect its color type. This is not correct and can be fixed by using the new SkImage::colorType() member function. Bug: 811303 Change-Id: I31584a6b0b5224f16d82184d1636f1349d350f3a Reviewed-on: https://chromium-review.googlesource.com/1032853 Commit-Queue: Mohammad Reza Zakerinasab <zakerinasab@chromium.org> Reviewed-by: Justin Novosad <junov@chromium.org> Cr-Commit-Position: refs/heads/master@{#554752} [modify] https://crrev.com/fe3eeccd2c79596b24ab6bb62014068f92dec81d/third_party/blink/renderer/core/html/canvas/image_data.cc [modify] https://crrev.com/fe3eeccd2c79596b24ab6bb62014068f92dec81d/third_party/blink/renderer/core/imagebitmap/image_bitmap.cc
,
Apr 30 2018
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by zakerinasab@chromium.org
, Feb 12 2018