Bug 300614

Summary: [GTK][WPE] Make ANGLE WebGL context not current before its destruction
Product: WebKit Reporter: Miguel Gomez <magomez>
Component: WebKitGTKAssignee: Miguel Gomez <magomez>
Status: NEW    
Severity: Normal CC: bugs-noreply, ian.grunert
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=300085
https://github.com/WebKit/WebKit/pull/52076

Miguel Gomez
Reported 2025-10-13 01:51:52 PDT
On https://commits.webkit.org/301043@main I reordered the calls to make the WebGL ANGLE context not current and destroy it, so the destruction would happen before the context was removed as current. This was done to make the destruction work on some platforms, after checking that the destruction of the current context just marks the context for destruction, and the context is not really destroyed until it's removed from current. But it seems that this the Windows port, and they had to add an exception to fix it in https://commits.webkit.org/301330@main. After some more testing, I think that the reorder was a mistake and it should be undone, so I'm creating a PR that will undo that. Also, this means that the workaround added for Windows should not be needed anymore, so I'll remove it as well, as the Windows problem should be fixed with this.
Attachments
Miguel Gomez
Comment 1 2025-10-13 02:54:26 PDT
Miguel Gomez
Comment 2 2025-10-13 03:23:11 PDT
I also realized that another problem with the Windows port was that their ANGLE sharingContext is a singleton, while for GTK/WPE it's not. So the sharingContext can't be destroyed for Windows. The PR sent is also taking that into account.
Note You need to log in before you can comment on or make changes to this bug.