You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit cf078d7
Browse filesBrowse the repository at this point in the historyBrowse files
Re-acquire governed WebGL contexts on a fresh canvas, never restoreContext() (#503)
* Re-acquire governed WebGL contexts on a fresh canvas, never restoreContext()
A chart released by the cross-tab context governor while its tab sat
hidden came back blank after revival: Chromium (observed in 151) restores
the context fully healthy - draws, readPixels and picking all succeed and
the stamp reads live - while the compositor presents that canvas element's
frames as empty for good. No redraw could show it (hover, resize,
backing-store reset, a second lose/restore cycle); only a fresh canvas
element presents again.
Governed releases now recover exactly like a real eviction: reserve with
the governor, then the existing fresh-canvas rebuild. The rebuild path
gains the restored handler's bookkeeping (restore count, context_restored
event) so every loss is still answered by exactly one restore. The loss
event deferral stays: the loss bookkeeping is bound to the canvas being
replaced.
* Add news fragment for the governed-revive fix (#503)
* Read gesture geometry from the live canvas after a context rebuild
_initInteraction captured the canvas element once; after a fresh-canvas
rebuild the handlers moved to the new canvas but still measured the
detached one, so wheel zoom (and drag/hover math) worked off a zero rect
and went to infinity. Governed revivals now rebuild on a fresh canvas on
every release, which made this visible on the first scroll after a chart
came back. The governed-native test now zooms the revived chart with a
wheel event and requires a finite, narrower range.
* Count restoreContext() on the extension cached at release time
The governed-native test's spy wrapped only extensions fetched after it
was installed; the released view's _ctxReleasedExt predates it, so a
same-canvas restore would have gone uncounted.
0 commit comments