@xyne/xyne-cli-linux-x64 0.4.4 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -17818,7 +17818,19 @@ Captured output:
|
|
|
17818
17818
|
if (this._controlState === "explicit_suspended" /* EXPLICIT_SUSPENDED */) {
|
|
17819
17819
|
return;
|
|
17820
17820
|
}
|
|
17821
|
+
this._needsRender = true;
|
|
17821
17822
|
if (this._isRunning) {
|
|
17823
|
+
if (this.rendering) {
|
|
17824
|
+
this.immediateRerenderRequested = true;
|
|
17825
|
+
return;
|
|
17826
|
+
}
|
|
17827
|
+
if (this._idleCadence && this.renderTimeout && !this.updateScheduled) {
|
|
17828
|
+
this.clock.clearTimeout(this.renderTimeout);
|
|
17829
|
+
this.renderTimeout = null;
|
|
17830
|
+
this._idleCadence = false;
|
|
17831
|
+
this.updateScheduled = true;
|
|
17832
|
+
this.clock.setTimeout(() => this.activateFrame(), 0);
|
|
17833
|
+
}
|
|
17822
17834
|
return;
|
|
17823
17835
|
}
|
|
17824
17836
|
if (this.rendering) {
|
|
@@ -18859,6 +18871,7 @@ Captured output:
|
|
|
18859
18871
|
return;
|
|
18860
18872
|
this.lastTime = this.normalizeClockTime(this.clock.now(), 0);
|
|
18861
18873
|
this.frameCount = 0;
|
|
18874
|
+
this._renderedOnce = false;
|
|
18862
18875
|
this.lastFpsTime = this.lastTime;
|
|
18863
18876
|
this.currentFps = 0;
|
|
18864
18877
|
this.loop();
|
|
@@ -18905,24 +18918,49 @@ Captured output:
|
|
|
18905
18918
|
}
|
|
18906
18919
|
const end = performance.now();
|
|
18907
18920
|
this.renderStats.frameCallbackTime = end - start;
|
|
18908
|
-
|
|
18909
|
-
|
|
18910
|
-
|
|
18921
|
+
// Dirty-gate: skip the (expensive) full scene render + TTY flush when
|
|
18922
|
+
// nothing changed this frame. Content setters, layout mutations, and
|
|
18923
|
+
// streaming all funnel through requestRender() -> _needsRender, so this
|
|
18924
|
+
// only skips genuinely idle frames. The first frame after every
|
|
18925
|
+
// (re)start always renders, gated on the monotonic _renderedOnce flag —
|
|
18926
|
+
// NOT frameCount, which is the rolling FPS counter the loop resets to 0
|
|
18927
|
+
// every >=1s (at the idle cadence that rollover happens on every tick,
|
|
18928
|
+
// which used to defeat this gate and force a full render each time).
|
|
18929
|
+
const needsRender =
|
|
18930
|
+
!this._renderedOnce ||
|
|
18931
|
+
this._needsRender ||
|
|
18932
|
+
this.liveRequestCounter > 0 ||
|
|
18933
|
+
this.immediateRerenderRequested ||
|
|
18934
|
+
this.frameCallbacks.length > 0;
|
|
18935
|
+
if (needsRender) {
|
|
18936
|
+
this._renderedOnce = true;
|
|
18937
|
+
this.root.render(this.nextRenderBuffer, deltaTime);
|
|
18938
|
+
for (const postProcessFn of this.postProcessFns) {
|
|
18939
|
+
postProcessFn(this.nextRenderBuffer, deltaTime);
|
|
18940
|
+
}
|
|
18941
|
+
this._console.renderToBuffer(this.nextRenderBuffer);
|
|
18911
18942
|
}
|
|
18912
|
-
this._console.renderToBuffer(this.nextRenderBuffer);
|
|
18913
18943
|
if (!this._isDestroyed) {
|
|
18914
|
-
|
|
18915
|
-
|
|
18916
|
-
this.
|
|
18944
|
+
if (needsRender) {
|
|
18945
|
+
this.renderNative();
|
|
18946
|
+
if (this._useMouse && this.lib.getHitGridDirty(this.rendererPtr)) {
|
|
18947
|
+
this.recheckHoverState();
|
|
18948
|
+
}
|
|
18917
18949
|
}
|
|
18918
18950
|
const overallFrameTime = performance.now() - overallStart;
|
|
18919
18951
|
this.lib.updateStats(this.rendererPtr, overallFrameTime, this.renderStats.fps, this.renderStats.frameCallbackTime);
|
|
18920
18952
|
if (this.gatherStats) {
|
|
18921
18953
|
this.collectStatSample(overallFrameTime);
|
|
18922
18954
|
}
|
|
18955
|
+
this._idleCadence = !needsRender;
|
|
18956
|
+
this._needsRender = false;
|
|
18923
18957
|
if (this._isRunning || this.immediateRerenderRequested) {
|
|
18924
|
-
const
|
|
18925
|
-
|
|
18958
|
+
const wantsFast =
|
|
18959
|
+
needsRender || this.immediateRerenderRequested || frameRequests.length > 0;
|
|
18960
|
+
const targetFrameTime = wantsFast ? this.minTargetFrameTime : this.targetFrameTime;
|
|
18961
|
+
const delay = wantsFast
|
|
18962
|
+
? Math.max(1, targetFrameTime - Math.floor(overallFrameTime))
|
|
18963
|
+
: 1000;
|
|
18926
18964
|
this.immediateRerenderRequested = false;
|
|
18927
18965
|
this.renderTimeout = this.clock.setTimeout(() => {
|
|
18928
18966
|
this.renderTimeout = null;
|
package/package.json
CHANGED
package/xyne-linux-x64
CHANGED
|
Binary file
|