Bug 229404 (webglcleanup)
Summary: | WebGL has a lot of #if USE(ANGLE) blocks, making it hard to maintain | ||
---|---|---|---|
Product: | WebKit | Reporter: | Kimmo Kinnunen <kkinnunen> |
Component: | WebGL | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED CONFIGURATION CHANGED | ||
Severity: | Normal | CC: | alex, dino, djg, don.olmstead, estea, Hironori.Fujii, kbr, kkinnunen, mmaxfield, webkit-bug-importer, zan |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Local Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | 229402, 229405 | ||
Bug Blocks: | 221664 |
Kimmo Kinnunen
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.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Kimmo Kinnunen
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.
Kimmo Kinnunen
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.
Fujii Hironori
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.
Radar WebKit Bug Importer
<rdar://problem/82517622>
Alejandro G. Castro
(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.
Kimmo Kinnunen
Ping, any progress on removing non-ANGLE WebGL codepaths?
Any place you would need help with that I would be able to contribute?
Zan Dobersek
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.
Don Olmstead
Could we have a discussion on this plan before moving forward?
Myles C. Maxfield
This is being discussed in the #angle channel of the open source webkit slack workspace.
Kimmo Kinnunen
Thhe ANGLE ifdef blocks are gone