WebGL has a lot of #if USE(ANGLE) blocks, making it hard to maintain There are 3 major implementations for WebGL: - OpenGL - OpenGL ES - ANGLE The WebGL layer should not #ifdef around these variations, rather the differences should be abstracted somehow so that the WebGL implementation is easier to maintain correctly.
In my personal opinion, it is only viable to run WebGL correctly with the ANGLE implementation. The simplest option to fix this bug, option A, would be to: 1) remove all WebGL-related code that is not inside #if USE(ANGLE). The other option, option B, would be to: 1) Move GCGL ANGLE implementation to GraphicsContextGLANGLE 2) Move #if !USE(ANGLE) code from WebGL to GraphicsContextGLOpenGL However, option B has the problem that TextureMapper uses GraphicsContextGLOpenGL, and it's not entirely clear to me if it's expected to work on ANGLE and OpenGL or just on OpenGL. If it's the latter, then the task is a bit simpler. If the former, then it's more work.
Hironori, would you have idea what is expected of TextureMapper, and/or who could give opinion on whether or not WebGL should work for non-Cocoa WebKit without ANGLE.
WinCairo finished USE_ANGLE migration. As far as I know, Igalia is working on the migration for GTK and WPE ports. (Bug 225563 comment 6). WebGL should work for them without ANGLE until Igalia finishes the migration. WinCairo is using TextureMapper with ANGLE and GraphicsLayerTextureMapper. GTK and WPE ports are using TextureMapper with OpenGL and GLES and CoordinatedGraphicsLayer.
<rdar://problem/82517622>
(In reply to Fujii Hironori from comment #3) > WinCairo finished USE_ANGLE migration. As far as I know, Igalia is working > on the migration for GTK and WPE ports. (Bug 225563 comment 6). > WebGL should work for them without ANGLE until Igalia finishes the > migration. > > WinCairo is using TextureMapper with ANGLE and GraphicsLayerTextureMapper. > GTK and WPE ports are using TextureMapper with OpenGL and GLES and > CoordinatedGraphicsLayer. Yes, we are currently working in a solution with ANGLE as the WebGL backend. We started checking and updating the current code.
Ping, any progress on removing non-ANGLE WebGL codepaths? Any place you would need help with that I would be able to contribute?
The desire is to make the switch after next release branching. That event is a matter of 1-2 weeks. In addition to that there's certain testing environment issues that still need resolving under the GTK port, but that's possibly addressable after turning ANGLE on.
Could we have a discussion on this plan before moving forward?
This is being discussed in the #angle channel of the open source webkit slack workspace.
Thhe ANGLE ifdef blocks are gone