mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Cesium: a blob's object URL is revoked once the blob is collected, not by time
Revoking a URL idle for a minute broke two things: the icon atlas, keyed by URL and never freeing a slot, took a new slot each time a blob was drawn again until it had no room; and an image material, which loads on its first draw, made hidden and shown later fetched a revoked URL and never drew. A blob now keeps one URL, revoked by a FinalizationRegistry once the blob itself is collected: anything that can still draw it holds it.
This commit is contained in:
1 parent
db80c9f141
commit
b3c6f35023
4 files changed
+70
-103
No files matched your search
@@ -160,8 +160,7 @@ 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,
|
||||
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
|
||||
revoked once the blob itself has been collected), 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.
|
||||
|
||||
Reference in new issue
Block a user