mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
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:
1 parent
e6d22e55d7
commit
d969df3d37
16 files changed
+192
-113
No files matched your search
@@ -3,7 +3,8 @@
|
||||
* @description The Cesium renderer's contract ports, built over a Cesium
|
||||
* widget or viewer someone else made and configured: frame phases, the
|
||||
* draw sets, `setView` and the pose, picks and projection, and capture.
|
||||
* Building them changes nothing in the scene; only calls do.
|
||||
* Building them puts the loop on demand (no holds yet, and no redraws for
|
||||
* scene time alone); nothing else in the scene changes until a call.
|
||||
*
|
||||
* The conformance renderer (`sceneRenderer.js`) and the application's
|
||||
* renderer (`appRenderer.js`) both use them, so what conformance
|
||||
@@ -233,8 +234,12 @@ export function createCesiumPorts(widget, { capabilities }) {
|
||||
if (scene.requestRenderMode === !continuous) return;
|
||||
scene.requestRenderMode = !continuous;
|
||||
}
|
||||
// On demand means drawn when asked, held or the view changed: never
|
||||
// because scene time moved on by itself. With no holds yet, it starts so.
|
||||
scene.maximumRenderTimeChange = Infinity;
|
||||
scene.requestRenderMode = true;
|
||||
let suspended = false;
|
||||
let targetFps = 0;
|
||||
let targetFps = widget.targetFrameRate > 0 ? widget.targetFrameRate : 0;
|
||||
|
||||
// Pending one-shot renders; disposal settles them rather than leave them
|
||||
// attached to a scene that will not render again.
|
||||
|
||||
Reference in new issue
Block a user