Commit 250e0ea
committed
fix(OpenGLRenderWindow): release WebGL context before view.delete()
vtkOpenGLRenderWindow.delete() tears down the vtk.js side of the view
but does not relinquish the underlying WebGL context. Chrome enforces a
hard per-process limit of ~16 WebGL contexts; mounting and unmounting
viewports across case transitions exhausted that pool, leaving any
still-active viewport blank.
Grab the canvas before delete(), look up the WEBGL_lose_context
extension, and call loseContext() so the GPU slot is returned to the
browser. Ordering matters: loseContext() must run before view.delete(),
otherwise the extension handle is already gone.1 parent 9d40712 commit 250e0ea
1 file changed
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
40 | 52 | | |
41 | 53 | | |
42 | 54 | | |
| |||
0 commit comments