Keep the render governor's holds on the frame port

The governor no longer writes the Cesium scene's render mode itself: each
owner holds the renderer's frame port once, requests go to it, and the
port is the one place the loop's mode is set. The port now also keeps
the loop from redrawing for scene time alone, which the governor did.

The application installs the governor as soon as its renderer exists and
holds the loop continuous ('boot') until its tools are up, where the
governor used to be installed, so boot draws as before. The hidden-tab
suspension goes through the port too, and the application's renderer now
has the whole frame port.
This commit is contained in:
Sameh Khamis committed 2026-11-05 17:24:34 -08:00
1 parent e6d22e55d7
commit d969df3d37
16 files changed
+192 -113

No files matched your search

+12
View File
@@ -442,3 +442,15 @@ test('releasing the last hold asks for one more frame', () => {
assert.equal(requests(), before + 1, 'a second release does nothing');
ports.dispose();
});
test('the loop starts on demand and never draws for scene time alone', () => {
const { widget, scene } = tickingWidget();
scene.requestRenderMode = false;
scene.maximumRenderTimeChange = 0;
widget.targetFrameRate = 60;
const ports = createCesiumPorts(widget, { capabilities: all });
assert.equal(scene.requestRenderMode, true);
assert.equal(scene.maximumRenderTimeChange, Infinity);
assert.equal(ports.frame.diagnostics().targetFps, 60, 'the widget’s cap');
ports.dispose();
});