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.
(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.
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.
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.
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).
(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.
<rdar://problem/36111549>
*** Bug 181208 has been marked as a duplicate of this bug. ***
Another test page: https://codepen.io/PavelDoGreat/pen/zdWzEL
(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/
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.
Created attachment 332428 [details] Patch
Committed r227702: <https://trac.webkit.org/changeset/227702>