diff --git a/RemoteDesktop/README.md b/RemoteDesktop/README.md index 988bb32..094f548 100644 --- a/RemoteDesktop/README.md +++ b/RemoteDesktop/README.md @@ -7,6 +7,7 @@ Further information on **wvnc**: [https://blog.lxsang.me/post/id/23](https://blo ## Change logs +* v0.1.9 - improve stability * v0.1.7-8 - remove package dependencies, use web assembly for jpeg decoding, improve rendering performance and connection stability * v0.1.6 - Change category * v0.1.5 - add package dependencies and use the new **libwvnc** diff --git a/RemoteDesktop/build/debug/README.md b/RemoteDesktop/build/debug/README.md index 988bb32..094f548 100644 --- a/RemoteDesktop/build/debug/README.md +++ b/RemoteDesktop/build/debug/README.md @@ -7,6 +7,7 @@ Further information on **wvnc**: [https://blog.lxsang.me/post/id/23](https://blo ## Change logs +* v0.1.9 - improve stability * v0.1.7-8 - remove package dependencies, use web assembly for jpeg decoding, improve rendering performance and connection stability * v0.1.6 - Change category * v0.1.5 - add package dependencies and use the new **libwvnc** diff --git a/RemoteDesktop/build/debug/decoder_asm.js b/RemoteDesktop/build/debug/decoder_asm.js index b49ef90..be57af6 100644 --- a/RemoteDesktop/build/debug/decoder_asm.js +++ b/RemoteDesktop/build/debug/decoder_asm.js @@ -24,19 +24,26 @@ w = datain[5] | (datain[6] << 8); h = datain[7] | (datain[8] << 8); flag = datain[9]; - p = api.createBuffer(datain.length); - Module.HEAP8.set(datain, p); - size = w * h * 4; - po = api.decodeBuffer(p, datain.length, size); - dataout = new Uint8Array(Module.HEAP8.buffer, po, size); msg = {}; - tmp = new Uint8Array(size); - tmp.set(dataout, 0); - msg.pixels = tmp.buffer; + msg.pixels = void 0; msg.x = x; msg.y = y; msg.w = w; msg.h = h; + size = w * h * 4; + tmp = new Uint8Array(size); + if (flag === 0) { + tmp.set(datain.subarray(10), 0); + msg.pixels = tmp.buffer; + postMessage(msg, [msg.pixels]); + return; + } + p = api.createBuffer(datain.length); + Module.HEAP8.set(datain, p); + po = api.decodeBuffer(p, datain.length, size); + dataout = new Uint8Array(Module.HEAP8.buffer, po, size); + tmp.set(dataout, 0); + msg.pixels = tmp.buffer; postMessage(msg, [msg.pixels]); api.destroyBuffer(po); return api.destroyBuffer(p); diff --git a/RemoteDesktop/build/debug/package.json b/RemoteDesktop/build/debug/package.json index caf57c9..b2987bd 100644 --- a/RemoteDesktop/build/debug/package.json +++ b/RemoteDesktop/build/debug/package.json @@ -7,7 +7,7 @@ "author": "Dany LE", "email": "contact@iohub.dev" }, - "version":"0.1.8-b", + "version":"0.1.9-b", "dependencies": [], "category":"Internet", "icon": "icon.png", diff --git a/RemoteDesktop/build/debug/wvnc_asm.wasm b/RemoteDesktop/build/debug/wvnc_asm.wasm index 0a17076..b07a94e 100644 Binary files a/RemoteDesktop/build/debug/wvnc_asm.wasm and b/RemoteDesktop/build/debug/wvnc_asm.wasm differ diff --git a/RemoteDesktop/build/release/RemoteDesktop.zip b/RemoteDesktop/build/release/RemoteDesktop.zip index cee9ece..45036ff 100644 Binary files a/RemoteDesktop/build/release/RemoteDesktop.zip and b/RemoteDesktop/build/release/RemoteDesktop.zip differ diff --git a/RemoteDesktop/coffees/WVNC.coffee b/RemoteDesktop/coffees/WVNC.coffee index db83c53..6a8741e 100644 --- a/RemoteDesktop/coffees/WVNC.coffee +++ b/RemoteDesktop/coffees/WVNC.coffee @@ -153,8 +153,6 @@ class WVNC if not @socket return data = new Uint8Array msg.pixels - #w = @buffer.width * @scale - #h = @buffer.height * @scale ctx = @canvas.getContext "2d", { alpha: false } imgData = ctx.createImageData msg.w, msg.h imgData.data.set data diff --git a/RemoteDesktop/javascript/decoder_asm.js b/RemoteDesktop/javascript/decoder_asm.js index b49ef90..be57af6 100644 --- a/RemoteDesktop/javascript/decoder_asm.js +++ b/RemoteDesktop/javascript/decoder_asm.js @@ -24,19 +24,26 @@ w = datain[5] | (datain[6] << 8); h = datain[7] | (datain[8] << 8); flag = datain[9]; - p = api.createBuffer(datain.length); - Module.HEAP8.set(datain, p); - size = w * h * 4; - po = api.decodeBuffer(p, datain.length, size); - dataout = new Uint8Array(Module.HEAP8.buffer, po, size); msg = {}; - tmp = new Uint8Array(size); - tmp.set(dataout, 0); - msg.pixels = tmp.buffer; + msg.pixels = void 0; msg.x = x; msg.y = y; msg.w = w; msg.h = h; + size = w * h * 4; + tmp = new Uint8Array(size); + if (flag === 0) { + tmp.set(datain.subarray(10), 0); + msg.pixels = tmp.buffer; + postMessage(msg, [msg.pixels]); + return; + } + p = api.createBuffer(datain.length); + Module.HEAP8.set(datain, p); + po = api.decodeBuffer(p, datain.length, size); + dataout = new Uint8Array(Module.HEAP8.buffer, po, size); + tmp.set(dataout, 0); + msg.pixels = tmp.buffer; postMessage(msg, [msg.pixels]); api.destroyBuffer(po); return api.destroyBuffer(p); diff --git a/RemoteDesktop/javascript/wvnc_asm.wasm b/RemoteDesktop/javascript/wvnc_asm.wasm index 0a17076..b07a94e 100755 Binary files a/RemoteDesktop/javascript/wvnc_asm.wasm and b/RemoteDesktop/javascript/wvnc_asm.wasm differ diff --git a/RemoteDesktop/package.json b/RemoteDesktop/package.json index caf57c9..b2987bd 100644 --- a/RemoteDesktop/package.json +++ b/RemoteDesktop/package.json @@ -7,7 +7,7 @@ "author": "Dany LE", "email": "contact@iohub.dev" }, - "version":"0.1.8-b", + "version":"0.1.9-b", "dependencies": [], "category":"Internet", "icon": "icon.png", diff --git a/packages.json b/packages.json index ee8b95b..7b7768f 100644 --- a/packages.json +++ b/packages.json @@ -365,7 +365,7 @@ "description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/RemoteDesktop/README.md", "category": "Internet", "author": "Dany LE", - "version": "0.1.8-b", + "version": "0.1.9-b", "dependencies": [],"category":"Internet","icon":"icon.png","mimes":["none"], "download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/RemoteDesktop/build/release/RemoteDesktop.zip" },