Update the browser, editor, settings, and installer
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
/** Bound frames in flight so image decoding cannot delay browser input. */
|
||||
export class FrameDelivery {
|
||||
sequence = 0;
|
||||
pending = new Map();
|
||||
canSend(time = performance.now()) {
|
||||
for (const [id, started] of this.pending) if (time - started > 250) this.pending.delete(id);
|
||||
return this.pending.size < 2;
|
||||
}
|
||||
sent(time = performance.now()) { const id = ++this.sequence; this.pending.set(id, time); return id; }
|
||||
acknowledge(id) { this.pending.delete(id); }
|
||||
clear() { this.pending.clear(); }
|
||||
}
|
||||
Reference in New Issue
Block a user