RESOLVED FIXED 209809
Add WebGL(2) context support to OffscreenCanvas
https://bugs.webkit.org/show_bug.cgi?id=209809
Summary Add WebGL(2) context support to OffscreenCanvas
Chris Lord
Reported 2020-03-31 07:52:34 PDT
After bug 202797, OffscreenCanvas works with 2d canvas contexts (minus text functions), but does not work for WebGL contexts. A lot of the WebGL code assumes an HTMLCanvasElement (mostly unnecessarily) - this bug covers the work needed to have it work with an OffscreenCanvas.
Attachments
Patch (27.04 KB, patch)
2020-08-27 01:30 PDT, Chris Lord
no flags
Patch (27.04 KB, patch)
2020-08-28 01:06 PDT, Chris Lord
no flags
Chris Lord
Comment 1 2020-08-27 01:30:42 PDT
Chris Lord
Comment 2 2020-08-27 01:31:39 PDT
(In reply to Chris Lord from comment #0) > After bug 202797, OffscreenCanvas works with 2d canvas contexts (minus text > functions), but does not work for WebGL contexts. A lot of the WebGL code > assumes an HTMLCanvasElement (mostly unnecessarily) - this bug covers the > work needed to have it work with an OffscreenCanvas. Far less than I thought actually, I'd made some wrong assumptions on an initial read of the code.
Kenneth Russell
Comment 3 2020-08-27 13:32:26 PDT
Comment on attachment 407383 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=407383&action=review Exciting to see this support being integrated! One small question. > LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext-expected.txt:3 > +FAIL Test that getContext with supported string returns correct results Can't find variable: WebGL2RenderingContext Is this particular failure mode expected? Does this mean that WebGL2RenderingContext wasn't properly exposed on a worker context?
Chris Lord
Comment 4 2020-08-28 00:43:17 PDT
(In reply to Kenneth Russell from comment #3) > Comment on attachment 407383 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=407383&action=review > > Exciting to see this support being integrated! One small question. > > > LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext-expected.txt:3 > > +FAIL Test that getContext with supported string returns correct results Can't find variable: WebGL2RenderingContext > > Is this particular failure mode expected? Does this mean that > WebGL2RenderingContext wasn't properly exposed on a worker context? This is just because WebGL2 requires ANGLE, which isn't used (by default? yet?) on WPE/GTK - this ought to work on Mac, but I don't have one to test that.
Chris Lord
Comment 5 2020-08-28 01:06:48 PDT
EWS
Comment 6 2020-08-28 01:46:50 PDT
Committed r266275: <https://trac.webkit.org/changeset/266275> All reviewed patches have been landed. Closing bug and clearing flags on attachment 407454 [details].
Radar WebKit Bug Importer
Comment 7 2020-08-28 01:47:13 PDT
Note You need to log in before you can comment on or make changes to this bug.