RESOLVED FIXED 179368
REGRESSION (r222961): Clear function not clearing whole screen when antialias is set to false
https://bugs.webkit.org/show_bug.cgi?id=179368
Summary REGRESSION (r222961): Clear function not clearing whole screen when antialias...
adrian
Reported 2017-11-07 01:45:04 PST
Created attachment 326201 [details] Issue as described, see how the clear colour is only around the primitives on screen When using WebGL in safari in high sierra, it seems gl.clear() no longer functions as expected. It only seems to clear around items that have been drawn to the screen and not the whole context like it does in every other browser and in previous safari in sierra. The attached screenshot is a modified version of our application, simplified (framebuffers removed, running extra clears to be certain etc) and with the clear colour set to black. As you can see the clear is happening only around the items on the screen and not the whole context. This webgl app also shows the same artifacts http://3dflipbook.net/. This issue only occurs when antialias is disabled when creating the context, as we use shader based antialiasing for performance reasons it is not acceptable workaround to enable it.
Attachments
Issue as described, see how the clear colour is only around the primitives on screen (557.86 KB, image/png)
2017-11-07 01:45 PST, adrian
no flags
Patch (1.73 KB, patch)
2018-01-26 16:39 PST, Dean Jackson
sam: review+
Jon Lee
Comment 1 2017-11-07 12:38:28 PST
(In reply to adrian from comment #0) > This webgl app also shows the same > artifacts http://3dflipbook.net/. Have you tried this on the latest 10.13.2 beta or STP 43? I am unable to reproduce.
adrian
Comment 2 2017-11-08 02:10:13 PST
It only happens in High Sierra with Safari Version 11.0.1 (13604.3.5). STP Release 43 (Safari 11.1, WebKit 13605.1.12) works fine but I can't tell my customers to use a technical preview.
Alexey Proskuryakov
Comment 3 2017-11-08 19:16:51 PST
Marking as fixed, as this must be fixe in WebKit trunk based on your STP testing. We can't track integration of fixes into shipping Apple products here in Bugzilla.
Kirill S. Dmitrenko
Comment 4 2017-12-18 10:11:58 PST
The issue is still present on MacBook Pro (15-inch, 2017) with macOS 10.12.6 running Safari 11.0.2 and 11.0.3. Here's a test page: https://codepen.io/dmikis/full/BJjqxY/. Canvas expected to be black, but it's white (or transparent).
Jon Lee
Comment 5 2017-12-18 11:32:48 PST
(In reply to Kirill S. Dmitrenko from comment #4) > The issue is still present on MacBook Pro (15-inch, 2017) with macOS 10.12.6 > running Safari 11.0.2 and 11.0.3. Here's a test page: > https://codepen.io/dmikis/full/BJjqxY/. Canvas expected to be black, but > it's white (or transparent). I can reproduce this on a recent build. Reopening.
Radar WebKit Bug Importer
Comment 6 2017-12-18 11:33:01 PST
Jon Lee
Comment 7 2018-01-02 17:15:27 PST
*** Bug 181208 has been marked as a duplicate of this bug. ***
Jon Lee
Comment 8 2018-01-02 17:15:45 PST
Kirill S. Dmitrenko
Comment 9 2018-01-25 10:56:31 PST
(In reply to Kirill S. Dmitrenko from comment #4) > https://codepen.io/dmikis/full/BJjqxY/ I've accidentally removed the page, here's another one: https://codepen.io/dmikis/full/PErxRr/
Dean Jackson
Comment 10 2018-01-25 14:27:46 PST
Things are quite crazy. We actually have a test for this: LayoutTests/fast/canvas/webgl/context-attributes-alpha.html (although that doesn't actually cover everything that is wrong here - it doesn't clear after drawing or toggle antialiasing) It works ok on some hardware with alpha: false, but then fails when antialias: false. On other hardware it fails with alpha: false.
Dean Jackson
Comment 11 2018-01-26 16:39:55 PST
Dean Jackson
Comment 12 2018-01-26 16:46:27 PST
Note You need to log in before you can comment on or make changes to this bug.