Canvas rendering subpixel artifacts with browser zoom
Reported by
a.goed...@googlemail.com,
Oct 11 2016
|
||||||
Issue descriptionUserAgent: 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.
,
Oct 11 2016
You have to call draw_slice() from the console.
,
Oct 11 2016
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.
,
Oct 11 2016
I printed chrome://gpu to a PDF.
,
Oct 11 2016
Thanks for your feedback, able to repro on stable and ToT.
,
Oct 14 2016
,
Oct 25 2016
,
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
,
Oct 25 2016
,
Oct 25 2016
Thanks a lot, that was quick! |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by xidac...@chromium.org
, Oct 11 2016