KhronosGroup/WebGL

WebGL is missing interface for offscreen context that has commit() method

Closed this issue · 3 comments

WebGL is missing interface for offscreen context that has commit() method
It appears to be mandatory for OffscreenCanvas:

https://html.spec.whatwg.org/multipage/canvas.html#offscreencontext-commit

OffscreenCanvas object. The bitmap of the OffscreenCanvas object is pushed to the placeholder canvas element by calling the commit() method of the OffscreenCanvas object's rendering context. All rendering context types that can be created by an OffscreenCanvas object must implement a commit() method. The exact behavior of the commit method (e.g. whether it copies or transfers bitmaps) may vary, as defined by the rendering contexts' respective specifications. Only the 2D context for offscreen canvases is defined in this specification.

OffscreenCanvas.commit() was supposed to have been removed from the specification after requestAnimationFrame was added to web workers, but whatwg/html#9979 was blocked due to disagreement among vendors. I hope that that PR will be unblocked and can land, cleaning up this method.

In the interim, I oppose adding a commit() method to WebGLRenderingContextBase because it moves the WebGL spec backward.

I don't think it moves the spec backwards in general. Wanting to move forward as discussed in the whatwg issue is worth discussing, but let's phrase it that way rather than using a contentious adjective.

After much discussion, the requirement of a commit() method on OffscreenCanvas's contexts was removed in whatwg/html#9979 . Closing this issue.