Cesium: revoke blob object URLs no longer drawn

The object URL store keeps its blob alive, so a blob image's URL, never
revoked, kept every blob ever drawn. A blob's URL is now revoked once it has
not been asked for in a minute with two frames drawn since (so a material,
which loads in the next frame, has started its load); images already
loading or loaded are unaffected, and a blob drawn again gets a new URL.
This commit is contained in:
Sameh Khamis committed 2026-11-11 19:34:43 -08:00
1 parent a3ffb33563
commit 748dc0a156
4 files changed
+124 -8

No files matched your search

+3 -1
View File
@@ -159,7 +159,9 @@ draws each.
The Cesium port takes every kind of `ImageRef` wherever an image is drawn
(icons on billboards and on the GPU, line patterns, shape fills, quads and
raster shells): a URL, SVG, a blob (by an object URL made once per blob), a
raster shells): a URL, SVG, a blob (by an object URL made once per blob,
revoked once not asked for in a minute and two drawn frames, so blobs no
longer drawn are let go; drawn again, a blob gets a new one), a
keyed canvas, and an atlas slot as the image it holds (an icon waits for an
unregistered slot; anything else refuses it). The check `draw.icons.images`
draws each kind on still and receding icons.