From fbbccf9a8b2b64a4228a8617792a8458bb8fed53 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Tue, 15 Nov 2016 15:58:05 +0000 Subject: [PATCH] broadway decoding is synchronous: simplify git-svn-id: https://xpra.org/svn/Xpra/trunk@14428 3bb7dfac-3a0b-4e04-842a-767bc560f471 --- src/html5/js/Window.js | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/src/html5/js/Window.js b/src/html5/js/Window.js index 49acb8632a..cd91b99a31 100644 --- a/src/html5/js/Window.js +++ b/src/html5/js/Window.js @@ -681,7 +681,6 @@ XpraWindow.prototype._init_broadway = function(width, height) { }); console.log("broadway decoder initialized: "+this.broadway_decoder); this.broadway_paint_location = [0, 0]; - this.broadway_decode_callbacks = []; this.broadway_decoder.onPictureDecoded = function(buffer, width, height, infos) { if(this.debug) { console.debug("broadway picture decoded: ", buffer.length, "bytes, size ", width, "x", height+", paint location: ", me.broadway_paint_location,"with infos=", infos); @@ -694,25 +693,10 @@ XpraWindow.prototype._init_broadway = function(width, height) { var x = me.broadway_paint_location[0]; var y = me.broadway_paint_location[1]; me.offscreen_canvas_ctx.putImageData(img, x, y); - try { - var cb = me.broadway_decode_callbacks.shift(); - cb(); - } - catch (e) { - console.error("video broadway no callback found for frame"); - } }; }; XpraWindow.prototype._close_broadway = function() { - var bdcs = this.broadway_decode_callbacks; - this.broadway_decode_callbacks = []; - if(bdcs) { - for(var i=0,j=bdcs.length;i