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

Issue 763605 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug

Blocked on:
issue skia:7038

Blocking:
issue 634542



Sign in to add a comment

canvas rgb value has a deviation

Reported by sunsho...@gmail.com, Sep 9 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.79 Safari/537.36

Steps to reproduce the problem:
1. Show a full black picture on the page, and draw the black picture in the canvas.
2. Use the color picker to extract the RGB values of the picture and the canvas, respectively.

What is the expected behavior?
The rgb value in the picture is the same as the canvas

What went wrong?
the rgb value in image is '#000000' ,but '#010001' in canvas

Did this work before? N/A 

Chrome version: 61.0.3163.79  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: 

Some computers are normal, some are not normal.
it is normal in ie.
 
demo.html
517 bytes View Download
img_black.jpg
22.3 KB View Download
QQ截图20170909101352.png
24.9 KB View Download
QQ截图20170909101436.png
19.5 KB View Download
it seems that canvas did not use ICC to load the image.
Labels: Needs-Triage-M61

Comment 3 by hdodda@chromium.org, Sep 11 2017

Cc: hdodda@chromium.org
Labels: Needs-Feedback
Thanks for reporting the issue.

Tested the issue on windows 7 and mac os 10.12.6 using chrome M61 #61.0.3163.79 and opened the given demo.html and observed that blank white page is loaded.


@sunshoupo-- Could you please provide us the sample file or url/jsfiddle that can reproduce the issue , that would help us in better understanding.

Thanks!


Comment 4 by sunsho...@gmail.com, Sep 11 2017

@hdodda
This is a self-built demo page blow,But I am worried that it can not be accessed due to the Great Wall firewall in China . 
You can also put the html file and the picture in the same folder, and then it should be able to access.

http://115.159.217.80/demo/demo.html
Project Member

Comment 5 by sheriffbot@chromium.org, Sep 11 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "hdodda@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Components: -Blink Blink>Canvas

Comment 7 by junov@chromium.org, Sep 11 2017

Owner: zakerinasab@chromium.org
Status: Assigned (was: Unconfirmed)
The bug was reproducible on M61 stable and Chrome ToT on Ubuntu. This is a regression and the bisect refers to https://chromium.googlesource.com/chromium/src/+log/6754203e3e27c476757265c0bd35a823258aa7bf..4bad57e09d4f88da3b7a296b90980d464a942b87.

The regression has happened after the CL "Use SkColorSpaceXform to handle color conversions in decoders" is landed:
https://chromium.googlesource.com/chromium/src/+/8de5bb3d8b53791711e7c387dc736817dd8947a7

I'll investigate further to see if this is a Blink issue or a Skia issue.

Cc: junov@chromium.org
Blockedon: skia:7038
Loaded the image into a Skia fiddle: https://fiddle.skia.org/c/a0b20793836946e8937b3506b0c9f7c7

Gpick returns 0,0,0 for the software path but 1,0,1 for the accelerated path. It seems to be a problem in Skia. A bug is filed: https://bugs.chromium.org/p/skia/issues/detail?id=7038
Project Member

Comment 12 by bugdroid1@chromium.org, Sep 13 2017

The following revision refers to this bug:
  https://skia.googlesource.com/skia/+/b433c5691b0d130697a89e7362c76ec6ae74a254

commit b433c5691b0d130697a89e7362c76ec6ae74a254
Author: Brian Osman <brianosman@google.com>
Date: Wed Sep 13 14:10:50 2017

Adjust GPU YUV -> RGB (JPG) conversion

All of the published coefficients assume math is being done on bytes, and
that 128 is the encoding of 0 (in the biased Cb and Cr values). When
sampling an A8 texture, though, GPUs typically decode as byte/255. Thus,
128 ends up slightly larger than 0.5. To fix this, just adjust the bias
terms to be scaled by 128/255, rather than 0.5.

I also changed some of the other coefficients to be higher precision,
based on the values in ITU-T T.871.

This originally surfaced as a Chromium bug where an all-black JPG decoded
to (1/255, 0, 1/255) on GPU. I've added a GM that encodes a color cube to
JPG, then draws from the encoded data. GPU and CPU (libjpeg) still
disagree in many cases, but the newer version performs much better
(diffing gl and 8888 configs):

Previously: 95.2% of pixels differ, max diff of 2, avg diff of 1
Now       : 65.4% of pixels differ, max diff of 1, avg diff of 0

Bug:  skia:7038   chromium:763605 
Change-Id: I4801db9f6e2fc4d4109eb5e27c9499f214084d38
Reviewed-on: https://skia-review.googlesource.com/45842
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

[modify] https://crrev.com/b433c5691b0d130697a89e7362c76ec6ae74a254/gn/gm.gni
[add] https://crrev.com/b433c5691b0d130697a89e7362c76ec6ae74a254/gm/jpg_color_cube.cpp
[modify] https://crrev.com/b433c5691b0d130697a89e7362c76ec6ae74a254/src/gpu/effects/GrYUVEffect.cpp

Project Member

Comment 13 by bugdroid1@chromium.org, Sep 13 2017

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

commit 653942c6d1b3e871f3367c0e779ffc01d0948c0d
Author: Brian Osman <brianosman@google.com>
Date: Wed Sep 13 16:30:23 2017

Suppress layout test failures for Skia JPEG decoding change

Bug:  763605 
Change-Id: I3e4c7fb40fe2e9dccdf0ba7549199466c785c605
Reviewed-on: https://chromium-review.googlesource.com/664983
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Cr-Commit-Position: refs/heads/master@{#501657}
[modify] https://crrev.com/653942c6d1b3e871f3367c0e779ffc01d0948c0d/third_party/WebKit/LayoutTests/TestExpectations

Project Member

Comment 14 by bugdroid1@chromium.org, Sep 14 2017

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

commit b5b6a7a9e15dc6b7a0bc353ef197df8b9134ca3d
Author: Brian Osman <brianosman@google.com>
Date: Thu Sep 14 21:00:23 2017

Rebaseline GPU JPEG tests

Bug:  chromium:763605 
Change-Id: I87626f3a7966e311b51d595f77d7ac49b335714d
Reviewed-on: https://chromium-review.googlesource.com/665717
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
Cr-Commit-Position: refs/heads/master@{#502038}
[modify] https://crrev.com/b5b6a7a9e15dc6b7a0bc353ef197df8b9134ca3d/third_party/WebKit/LayoutTests/platform/linux/virtual/gpu-rasterization/images/color-profile-background-image-space-expected.png
[modify] https://crrev.com/b5b6a7a9e15dc6b7a0bc353ef197df8b9134ca3d/third_party/WebKit/LayoutTests/platform/linux/virtual/gpu-rasterization/images/color-profile-svg-expected.png
[modify] https://crrev.com/b5b6a7a9e15dc6b7a0bc353ef197df8b9134ca3d/third_party/WebKit/LayoutTests/platform/linux/virtual/gpu-rasterization/images/color-profile-svg-fill-text-expected.png
[modify] https://crrev.com/b5b6a7a9e15dc6b7a0bc353ef197df8b9134ca3d/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/gpu-rasterization/images/color-profile-svg-fill-text-expected.png
[add] https://crrev.com/b5b6a7a9e15dc6b7a0bc353ef197df8b9134ca3d/third_party/WebKit/LayoutTests/platform/mac-mac10.9/virtual/gpu-rasterization/images/color-profile-background-image-space-expected.png
[add] https://crrev.com/b5b6a7a9e15dc6b7a0bc353ef197df8b9134ca3d/third_party/WebKit/LayoutTests/platform/mac-mac10.9/virtual/gpu-rasterization/images/color-profile-svg-expected.png
[modify] https://crrev.com/b5b6a7a9e15dc6b7a0bc353ef197df8b9134ca3d/third_party/WebKit/LayoutTests/platform/mac-mac10.9/virtual/gpu-rasterization/images/color-profile-svg-fill-text-expected.png
[modify] https://crrev.com/b5b6a7a9e15dc6b7a0bc353ef197df8b9134ca3d/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/color-profile-svg-fill-text-expected.png
[modify] https://crrev.com/b5b6a7a9e15dc6b7a0bc353ef197df8b9134ca3d/third_party/WebKit/LayoutTests/platform/win/virtual/gpu-rasterization/images/color-profile-background-image-space-expected.png
[modify] https://crrev.com/b5b6a7a9e15dc6b7a0bc353ef197df8b9134ca3d/third_party/WebKit/LayoutTests/platform/win/virtual/gpu-rasterization/images/color-profile-svg-expected.png
[modify] https://crrev.com/b5b6a7a9e15dc6b7a0bc353ef197df8b9134ca3d/third_party/WebKit/LayoutTests/platform/win/virtual/gpu-rasterization/images/color-profile-svg-fill-text-expected.png

Status: Fixed (was: Assigned)
May I know which version released will fix this bug? 
M63.
Project Member

Comment 18 by bugdroid1@chromium.org, Oct 11 2017

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

commit 72142e5c1a59c58cc755e4da50f52f6a0c5c25fc
Author: Brian Osman <brianosman@google.com>
Date: Wed Oct 11 20:22:06 2017

Remove test suppresion for JPG changes

Bug:  763605 
Bug: 764179
Change-Id: Ie6e311b4d0021bf9ba16dbdf734bcbd3450e6ea5
Reviewed-on: https://chromium-review.googlesource.com/667207
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
Cr-Commit-Position: refs/heads/master@{#508091}
[modify] https://crrev.com/72142e5c1a59c58cc755e4da50f52f6a0c5c25fc/third_party/WebKit/LayoutTests/TestExpectations
[delete] https://crrev.com/c52018d4a712ff7f74d920f2c5271947c4e80d22/third_party/WebKit/LayoutTests/platform/linux/virtual/gpu-rasterization/images/color-profile-background-image-space-expected.png
[delete] https://crrev.com/c52018d4a712ff7f74d920f2c5271947c4e80d22/third_party/WebKit/LayoutTests/platform/linux/virtual/gpu-rasterization/images/color-profile-svg-expected.png
[modify] https://crrev.com/72142e5c1a59c58cc755e4da50f52f6a0c5c25fc/third_party/WebKit/LayoutTests/platform/linux/virtual/gpu-rasterization/images/color-profile-svg-fill-text-expected.png
[delete] https://crrev.com/c52018d4a712ff7f74d920f2c5271947c4e80d22/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/gpu-rasterization/images/color-profile-background-image-space-expected.png
[modify] https://crrev.com/72142e5c1a59c58cc755e4da50f52f6a0c5c25fc/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/gpu-rasterization/images/color-profile-svg-fill-text-expected.png
[delete] https://crrev.com/c52018d4a712ff7f74d920f2c5271947c4e80d22/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/gpu-rasterization/images/color-profile-background-image-space-expected.png
[delete] https://crrev.com/c52018d4a712ff7f74d920f2c5271947c4e80d22/third_party/WebKit/LayoutTests/platform/mac-retina/virtual/gpu-rasterization/images/color-profile-background-image-space-expected.png
[delete] https://crrev.com/c52018d4a712ff7f74d920f2c5271947c4e80d22/third_party/WebKit/LayoutTests/platform/mac-retina/virtual/gpu-rasterization/images/color-profile-svg-expected.png
[modify] https://crrev.com/72142e5c1a59c58cc755e4da50f52f6a0c5c25fc/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/color-profile-background-image-space-expected.png
[modify] https://crrev.com/72142e5c1a59c58cc755e4da50f52f6a0c5c25fc/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/color-profile-svg-expected.png
[modify] https://crrev.com/72142e5c1a59c58cc755e4da50f52f6a0c5c25fc/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/color-profile-svg-fill-text-expected.png
[modify] https://crrev.com/72142e5c1a59c58cc755e4da50f52f6a0c5c25fc/third_party/WebKit/LayoutTests/platform/win/virtual/gpu-rasterization/images/color-profile-background-image-space-expected.png
[modify] https://crrev.com/72142e5c1a59c58cc755e4da50f52f6a0c5c25fc/third_party/WebKit/LayoutTests/platform/win/virtual/gpu-rasterization/images/color-profile-svg-expected.png
[modify] https://crrev.com/72142e5c1a59c58cc755e4da50f52f6a0c5c25fc/third_party/WebKit/LayoutTests/platform/win/virtual/gpu-rasterization/images/color-profile-svg-fill-text-expected.png

Blocking: 634542

Sign in to add a comment