Bug 181007 - WebGL canvas with enabled blending and no antialiasing is incorrectly composed with background
Summary: WebGL canvas with enabled blending and no antialiasing is incorrectly compose...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: Safari 11
Hardware: Mac macOS 10.12
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-12-19 16:00 PST by Kirill S. Dmitrenko
Modified: 2019-06-10 23:11 PDT (History)
5 users (show)

See Also:


Attachments
Expected result (325.37 KB, image/png)
2017-12-19 16:00 PST, Kirill S. Dmitrenko
no flags Details
Actual result in Safari 11.0.3 (203.04 KB, image/png)
2017-12-19 16:00 PST, Kirill S. Dmitrenko
no flags Details
Code of the test page (3.36 KB, application/zip)
2017-12-19 16:01 PST, Kirill S. Dmitrenko
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kirill S. Dmitrenko 2017-12-19 16:00:11 PST
Created attachment 329849 [details]
Expected result

If threre's a html element with a background underneath the canvas, and blending is enabled in the context, composition for some reason goes "additive". Here's a test page: https://codepen.io/dmikis/full/ZvQPBG/.
Comment 1 Kirill S. Dmitrenko 2017-12-19 16:00:41 PST
Created attachment 329850 [details]
Actual result in Safari 11.0.3
Comment 2 Kirill S. Dmitrenko 2017-12-19 16:01:07 PST
Created attachment 329851 [details]
Code of the test page
Comment 3 Radar WebKit Bug Importer 2017-12-19 17:21:19 PST
<rdar://problem/36145405>
Comment 4 Kirill S. Dmitrenko 2018-01-09 06:28:45 PST
I forgot to mention that the problem reproduces only on discrete GPUs.
Comment 5 Dean Jackson 2018-01-12 15:23:16 PST
We can reproduce. We've forwarded on to our compositing team.
Comment 6 Kirill S. Dmitrenko 2018-01-31 05:18:39 PST
We've got more complaint from users, and it seems that on some configuration antialiasing doesn't affect the problem (i.e., if antialias is set, rendered result is still "blended" with CSS background). In particular, on macOS 10.11 and 10.13 the problem occurs.
Comment 7 Simon Fraser (smfr) 2018-11-28 13:38:59 PST
The test page no longer works (stv.maps.yandex.net now gives 404 errors).
Comment 8 Simon Fraser (smfr) 2018-11-28 13:49:17 PST
Also, this should have been fixed in macOS Mojave. Can you test and report back?
Comment 9 Gregg Tavares 2019-06-10 23:11:34 PDT
this seems fixed to me.

Tested on MacOS 10.14.5 on 2014 MBP and on iOS 12.3.1 iPhoneX

Mark as resolved?