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

Issue 654700 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Canvas rendering subpixel artifacts with browser zoom

Reported by a.goed...@googlemail.com, Oct 11 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.34 Safari/537.36

Steps to reproduce the problem:
The attached test case has two functions, which fill a canvas by drawing strips. 

The first does this using a for loop. Then the canvas ends up being filled, as expected.
If rendering each strip withing a rendering frame callback, the canvas ends up with subpixel gaps. Those seem to be triggered by a paint optimization, since the image data inside of the canvas is consistent (all filled). Also, those artifacts go away when changing tabs or similar things which lead to a full repaint.

1. Set the browser to zoom level > 100%.
2. Call draw_slice() from the console and wait for the animation to finish.

What is the expected behavior?
The canvas should end up being filled white.

What went wrong?
The canvas shows a series of subpixel strips.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 54.0.2840.34  Channel: n/a
OS Version: 
Flash Version: 

I attached both a testcase and a screenshot.
 
index.html
501 bytes View Download
screenshot.png
38.9 KB View Download
Labels: Needs-Feedback
I tried the test page, I see a black screen and there is no white area in it. Could you please double check your script. Thanks.
You have to call draw_slice() from the console.
Owner: xidac...@chromium.org
Thanks for your quick response. I tried that on both stable and ToT, but I cannot repro the bug. Could you please attach a screenshot of chrome://gpu page? Thanks.
I printed chrome://gpu to a PDF.
chrome___gpu.pdf
95.2 KB Download
Cc: xidac...@chromium.org
Labels: -Needs-Feedback
Owner: ----
Status: Available (was: Unconfirmed)
Thanks for your feedback, able to repro on stable and ToT.
Owner: zakerinasab@chromium.org
Labels: -OS-Linux OS-All
Project Member

Comment 8 by bugdroid1@chromium.org, Oct 25 2016

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

commit 4bdb40f764d2fc3ac7f4e34da68424e84b89968f
Author: zakerinasab <zakerinasab@chromium.org>
Date: Tue Oct 25 16:52:02 2016

Fixing color bleeding when the canvas is stretched.

When the canvas is stretched by zooming the browser window,
the interpolation filter may cause color bleeding. We fix this
by half-pixel padding before paint invalidation when necessary.

BUG= 654700 

Review-Url: https://codereview.chromium.org/2438313002
Cr-Commit-Position: refs/heads/master@{#427382}

[add] https://crrev.com/4bdb40f764d2fc3ac7f4e34da68424e84b89968f/third_party/WebKit/ManualTests/canvas-stretch-color-bleeding.html
[modify] https://crrev.com/4bdb40f764d2fc3ac7f4e34da68424e84b89968f/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp

Status: Fixed (was: Available)
Thanks a lot, that was quick!

Sign in to add a comment