smashed a frame dropping bug
This commit is contained in:
parent
56a2e2dec9
commit
70faacff85
|
@ -115,6 +115,8 @@ export default class Display {
|
||||||
if (!this._isPrimaryDisplay) {
|
if (!this._isPrimaryDisplay) {
|
||||||
this._screens[0].channel = new BroadcastChannel(`screen_${this._screenID}_channel`);
|
this._screens[0].channel = new BroadcastChannel(`screen_${this._screenID}_channel`);
|
||||||
this._screens[0].channel.addEventListener('message', this._handleSecondaryDisplayMessage.bind(this));
|
this._screens[0].channel.addEventListener('message', this._handleSecondaryDisplayMessage.bind(this));
|
||||||
|
} else {
|
||||||
|
this._animationFrameID = window.requestAnimationFrame( () => { this._pushAsyncFrame(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.Debug("<< Display.constructor");
|
Log.Debug("<< Display.constructor");
|
||||||
|
@ -481,7 +483,8 @@ export default class Display {
|
||||||
*/
|
*/
|
||||||
flush(onflush_message=true) {
|
flush(onflush_message=true) {
|
||||||
//force oldest frame to render
|
//force oldest frame to render
|
||||||
window.requestAnimationFrame( () => { this._pushAsyncFrame(); });
|
//window.requestAnimationFrame( () => { this._pushAsyncFrame(); });
|
||||||
|
this._asyncFrameComplete(0, true);
|
||||||
|
|
||||||
if (onflush_message)
|
if (onflush_message)
|
||||||
this.onflush();
|
this.onflush();
|
||||||
|
@ -826,7 +829,7 @@ export default class Display {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._asyncFrameQueue[frameIx][2].length >= this._asyncFrameQueue[frameIx][1]) {
|
if (this._asyncFrameQueue[frameIx][1] > 0 && this._asyncFrameQueue[frameIx][2].length >= this._asyncFrameQueue[frameIx][1]) {
|
||||||
//frame is complete
|
//frame is complete
|
||||||
this._asyncFrameComplete(frameIx);
|
this._asyncFrameComplete(frameIx);
|
||||||
}
|
}
|
||||||
|
@ -904,7 +907,7 @@ export default class Display {
|
||||||
this._asyncFrameQueue[frameIx][4] = currentFrameRectIx;
|
this._asyncFrameQueue[frameIx][4] = currentFrameRectIx;
|
||||||
this._asyncFrameQueue[frameIx][3] = true;
|
this._asyncFrameQueue[frameIx][3] = true;
|
||||||
|
|
||||||
window.requestAnimationFrame( () => { this._pushAsyncFrame(); });
|
//window.requestAnimationFrame( () => { this._pushAsyncFrame(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1000,6 +1003,10 @@ export default class Display {
|
||||||
this._pushAsyncFrame(true);
|
this._pushAsyncFrame(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!force) {
|
||||||
|
window.requestAnimationFrame( () => { this._pushAsyncFrame(); });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_processRectScreens(rect) {
|
_processRectScreens(rect) {
|
||||||
|
|
Loading…
Reference in New Issue