Read pixels and release unused caches through the Cesium renderer

The shared Cesium ports gain readPixels and releaseUnused, on both the
conformance renderer and the application's.

readPixels reads the drawn frame off the canvas at once, cropped in CSS
pixels and scaled from the canvas's CSS size, through one reused 2D canvas.
A canvas with no size reads blank.

releaseUnused trims every 3D tileset's cache, and after the next drawn frame
frees the globe tiles that frame did not draw. Cesium trims the globe's
cache only while tiles load, so a settled view would otherwise free nothing;
the trim goes through internals.js. The reader canvas is dropped too.

Two new checks, renderer.readPixels and renderer.releaseUnused, run on
Cesium and the stub.
This commit is contained in:
Sameh Khamis committed 2026-11-06 17:42:13 -08:00
1 parent 6ffdf30795
commit 8f612ba858
9 files changed
+184 -7

No files matched your search

+3 -5
View File
@@ -317,8 +317,6 @@ test('the application refuses a renderer it cannot run on, and destroys it', asy
assert.deepEqual(destroyed, ['other']);
});
const EXPECTED_MISSING = [
'renderer.globe',
'renderer.readPixels',
'renderer.releaseUnused',
].map((member) => `${member} is missing`);
const EXPECTED_MISSING = ['renderer.globe'].map(
(member) => `${member} is missing`,
);