KASM-5563 limit secondary screen rect buffer size (#95)
Co-authored-by: mattmcclaskey <matt@kasmweb.com>
This commit is contained in:
parent
7919f6c750
commit
933d5b7505
|
@ -899,6 +899,11 @@ export default class Display {
|
|||
break;
|
||||
}
|
||||
this._syncFrameQueue.push(rect);
|
||||
|
||||
//if the secondary display is not in focus, the browser may not call requestAnimationFrame, thus we need to limit our buffer
|
||||
if (this._syncFrameQueue.length > 500) {
|
||||
this._syncFrameQueue.pop();
|
||||
}
|
||||
break;
|
||||
case 'frameComplete':
|
||||
window.requestAnimationFrame( () => { this._pushSyncRects(); });
|
||||
|
|
Loading…
Reference in New Issue