@supraio/client-daemon-js 0.0.1 → 1.0.0-mzscreengeometry.447
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/daemon.html +1 -1
- package/daemon.js +25 -17
- package/daemon.js.map +2 -2
- package/package.json +3 -3
- package/screen/control.d.ts +16 -0
- package/screen/nacldecoder.d.ts +2 -1
- package/screen/options.d.ts +11 -0
- package/screen/plain.d.ts +2 -1
- package/screen/samsungwasmdecoder.d.ts +1 -1
- package/screen/shared.d.ts +2 -1
- package/screen/wasm.d.ts +2 -1
- package/screen/workerFrameConnection.d.ts +2 -1
- package/screen.html +1 -1
- package/screen.js +100 -42
- package/screen.js.map +2 -2
- package/sdk.d.ts +1 -0
- package/sdk.js +110 -44
- package/sdk.js.map +2 -2
- package/supra-client-daemon.js +402 -232
- package/supra-client-daemon.js.map +1 -1
- package/supra-client-daemon.wasm +0 -0
- package/supra-client-screen.js +925 -491
- package/supra-client-screen.js.map +1 -1
- package/supra-client-screen.wasm +0 -0
package/supra-client-daemon.js
CHANGED
|
@@ -161854,7 +161854,7 @@ $packages["github.com/supraio/client-daemon/pkg/netclient"] = (function() {
|
|
|
161854
161854
|
return $pkg;
|
|
161855
161855
|
})();
|
|
161856
161856
|
$packages["github.com/supraio/client-daemon/pkg/netpacket"] = (function() {
|
|
161857
|
-
var $pkg = {}, $init, context, websocket, errs, jshelper, netnacltcp, netsamsungwasmtcp, js, time, SamsungWasmTCPConn, NaClTCPConn, JsWebsocketConn, JsWebsocketWorkerConn, Driver, sliceType, ptrType, mapType, funcType, arrayType, sliceType$1, sliceType$2, ptrType$1, ptrType$2, ptrType$3, ptrType$4, ptrType$5, connects, maxPacketSizes, init, ConnectSamsungWasmTCP, init$1, ConnectNaClTCP, init$2, ConnectJsWebsocket;
|
|
161857
|
+
var $pkg = {}, $init, context, websocket, errs, jshelper, netnacltcp, netsamsungwasmtcp, js, time, SamsungWasmTCPConn, NaClTCPConn, JsWebsocketConn, JsWebsocketWorkerConn, Driver, sliceType, ptrType, mapType, funcType, arrayType, sliceType$1, sliceType$2, ptrType$1, ptrType$2, ptrType$3, ptrType$4, ptrType$5, connects, maxPacketSizes, init, ConnectSamsungWasmTCP, init$1, ConnectNaClTCP, init$2, getPerformanceTimestamp, ConnectJsWebsocket;
|
|
161858
161858
|
context = $packages["context"];
|
|
161859
161859
|
websocket = $packages["github.com/coder/websocket"];
|
|
161860
161860
|
errs = $packages["github.com/supraio/client-daemon/pkg/errs"];
|
|
@@ -162249,7 +162249,7 @@ $packages["github.com/supraio/client-daemon/pkg/netpacket"] = (function() {
|
|
|
162249
162249
|
};
|
|
162250
162250
|
JsWebsocketWorkerConn.prototype.Close = function() { return this.$val.Close(); };
|
|
162251
162251
|
JsWebsocketWorkerConn.ptr.prototype.CollectFrame = function() {
|
|
162252
|
-
var {$24r, _r, _r$1, _r$2, _tuple, c, err, frame, $s, $r, $c} = $restore(this, {});
|
|
162252
|
+
var {$24r, $24r$1, $24r$2, _r, _r$1, _r$2, _r$3, _r$4, _tuple, c, err, frame, $s, $r, $c} = $restore(this, {});
|
|
162253
162253
|
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
162254
162254
|
c = this;
|
|
162255
162255
|
_r = $clone(c.conn, js.Value).Call("collectFrame", sliceType.nil); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
@@ -162261,13 +162261,56 @@ $packages["github.com/supraio/client-daemon/pkg/netpacket"] = (function() {
|
|
|
162261
162261
|
/* */ $s = 4; continue;
|
|
162262
162262
|
/* if (!(err === ptrType.nil)) { */ case 3:
|
|
162263
162263
|
_r$2 = jshelper.GetError(err); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
162264
|
-
$24r = [ptrType.nil, _r$2];
|
|
162264
|
+
$24r = [ptrType.nil, 0, _r$2];
|
|
162265
162265
|
$s = 6; case 6: return $24r;
|
|
162266
162266
|
/* } */ case 4:
|
|
162267
|
-
|
|
162268
|
-
/* */
|
|
162267
|
+
/* */ if (frame === ptrType.nil || $clone(frame, js.Value).IsUndefined() || $clone(frame, js.Value).IsNull()) { $s = 7; continue; }
|
|
162268
|
+
/* */ $s = 8; continue;
|
|
162269
|
+
/* if (frame === ptrType.nil || $clone(frame, js.Value).IsUndefined() || $clone(frame, js.Value).IsNull()) { */ case 7:
|
|
162270
|
+
_r$3 = errs.Errorf("Worker frame collection returned no frame", sliceType.nil); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
162271
|
+
$24r$1 = [ptrType.nil, 0, _r$3];
|
|
162272
|
+
$s = 10; case 10: return $24r$1;
|
|
162273
|
+
/* } */ case 8:
|
|
162274
|
+
_r$4 = getPerformanceTimestamp(); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
|
|
162275
|
+
$24r$2 = [frame, _r$4, $ifaceNil];
|
|
162276
|
+
$s = 12; case 12: return $24r$2;
|
|
162277
|
+
/* */ } return; } var $f = {$blk: JsWebsocketWorkerConn.ptr.prototype.CollectFrame, $c: true, $r, $24r, $24r$1, $24r$2, _r, _r$1, _r$2, _r$3, _r$4, _tuple, c, err, frame, $s};return $f;
|
|
162269
162278
|
};
|
|
162270
162279
|
JsWebsocketWorkerConn.prototype.CollectFrame = function() { return this.$val.CollectFrame(); };
|
|
162280
|
+
getPerformanceTimestamp = function() {
|
|
162281
|
+
var {$24r, $24r$1, $24r$2, _r, _r$1, _r$2, _r$3, _r$4, _r$5, date, global, now, performance, timeOrigin, $s, $r, $c} = $restore(this, {});
|
|
162282
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
162283
|
+
global = $clone(js.Global(), js.Value);
|
|
162284
|
+
performance = $clone($clone(global, js.Value).Get("performance"), js.Value);
|
|
162285
|
+
/* */ if (!$clone(performance, js.Value).IsUndefined() && !$clone(performance, js.Value).IsNull()) { $s = 1; continue; }
|
|
162286
|
+
/* */ $s = 2; continue;
|
|
162287
|
+
/* if (!$clone(performance, js.Value).IsUndefined() && !$clone(performance, js.Value).IsNull()) { */ case 1:
|
|
162288
|
+
timeOrigin = $clone($clone(performance, js.Value).Get("timeOrigin"), js.Value);
|
|
162289
|
+
now = $clone($clone(performance, js.Value).Get("now"), js.Value);
|
|
162290
|
+
/* */ if (($clone(timeOrigin, js.Value).Type() === 3) && ($clone(now, js.Value).Type() === 7)) { $s = 3; continue; }
|
|
162291
|
+
/* */ $s = 4; continue;
|
|
162292
|
+
/* if (($clone(timeOrigin, js.Value).Type() === 3) && ($clone(now, js.Value).Type() === 7)) { */ case 3:
|
|
162293
|
+
_r = $clone(performance, js.Value).Call("now", sliceType.nil); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
162294
|
+
_r$1 = $clone(_r, js.Value).Float(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
162295
|
+
$24r = $clone(timeOrigin, js.Value).Float() + _r$1;
|
|
162296
|
+
$s = 7; case 7: return $24r;
|
|
162297
|
+
/* } */ case 4:
|
|
162298
|
+
/* } */ case 2:
|
|
162299
|
+
date = $clone($clone(global, js.Value).Get("Date"), js.Value);
|
|
162300
|
+
/* */ if (!$clone(date, js.Value).IsUndefined() && !$clone(date, js.Value).IsNull() && ($clone($clone(date, js.Value).Get("now"), js.Value).Type() === 7)) { $s = 8; continue; }
|
|
162301
|
+
/* */ $s = 9; continue;
|
|
162302
|
+
/* if (!$clone(date, js.Value).IsUndefined() && !$clone(date, js.Value).IsNull() && ($clone($clone(date, js.Value).Get("now"), js.Value).Type() === 7)) { */ case 8:
|
|
162303
|
+
_r$2 = $clone(date, js.Value).Call("now", sliceType.nil); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
162304
|
+
_r$3 = $clone(_r$2, js.Value).Float(); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
162305
|
+
$24r$1 = _r$3;
|
|
162306
|
+
$s = 12; case 12: return $24r$1;
|
|
162307
|
+
/* } */ case 9:
|
|
162308
|
+
_r$4 = time.Now(); /* */ $s = 13; case 13: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
|
|
162309
|
+
_r$5 = $clone(_r$4, time.Time).UnixNano(); /* */ $s = 14; case 14: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
|
|
162310
|
+
$24r$2 = ($flatten64(_r$5)) / 1e+06;
|
|
162311
|
+
$s = 15; case 15: return $24r$2;
|
|
162312
|
+
/* */ } return; } var $f = {$blk: getPerformanceTimestamp, $c: true, $r, $24r, $24r$1, $24r$2, _r, _r$1, _r$2, _r$3, _r$4, _r$5, date, global, now, performance, timeOrigin, $s};return $f;
|
|
162313
|
+
};
|
|
162271
162314
|
ConnectJsWebsocket = function(host, timeout, secure) {
|
|
162272
162315
|
var {$24r, $24r$1, $24r$2, _r, _r$1, _tuple, _tuple$1, cancel, conn, ctx, err, host, protocol, secure, timeout, url, workerFactory, $s, $deferred, $r, $c} = $restore(this, {host, timeout, secure});
|
|
162273
162316
|
/* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred);
|
|
@@ -162306,7 +162349,7 @@ $packages["github.com/supraio/client-daemon/pkg/netpacket"] = (function() {
|
|
|
162306
162349
|
ptrType$1.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$2], [$Int, $error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$2], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "GetJSConnection", name: "GetJSConnection", pkg: "", typ: $funcType([], [ptrType], false)}];
|
|
162307
162350
|
ptrType$2.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$2], [$Int, $error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$2], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "GetJSConnection", name: "GetJSConnection", pkg: "", typ: $funcType([], [ptrType], false)}];
|
|
162308
162351
|
ptrType$4.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$2], [$Int, $error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$2], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}];
|
|
162309
|
-
ptrType$5.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$2], [$Int, $error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$2], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "CollectFrame", name: "CollectFrame", pkg: "", typ: $funcType([], [ptrType, $error], false)}];
|
|
162352
|
+
ptrType$5.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$2], [$Int, $error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$2], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "CollectFrame", name: "CollectFrame", pkg: "", typ: $funcType([], [ptrType, $Float64, $error], false)}];
|
|
162310
162353
|
SamsungWasmTCPConn.init("github.com/supraio/client-daemon/pkg/netpacket", [{prop: "conn", name: "conn", embedded: false, exported: false, typ: ptrType, tag: ""}]);
|
|
162311
162354
|
NaClTCPConn.init("github.com/supraio/client-daemon/pkg/netpacket", [{prop: "conn", name: "conn", embedded: false, exported: false, typ: ptrType, tag: ""}]);
|
|
162312
162355
|
JsWebsocketConn.init("github.com/supraio/client-daemon/pkg/netpacket", [{prop: "conn", name: "conn", embedded: false, exported: false, typ: ptrType$3, tag: ""}]);
|
|
@@ -183653,23 +183696,27 @@ $packages["golang.org/x/exp/shiny/driver/util/dom"] = (function() {
|
|
|
183653
183696
|
handler = [handler];
|
|
183654
183697
|
opts = [opts];
|
|
183655
183698
|
d[0] = this;
|
|
183656
|
-
handler[0] = $clone(js.FuncOf((function(d, eventName, eventType, handler, opts) { return function(this$1, args) {
|
|
183657
|
-
var args, changedTouches, ev, t, this$1;
|
|
183699
|
+
handler[0] = $clone(js.FuncOf((function(d, eventName, eventType, handler, opts) { return function $b(this$1, args) {
|
|
183700
|
+
var {_r, args, changedTouches, ev, t, this$1, $s, $r, $c} = $restore(this, {this$1, args});
|
|
183701
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
183658
183702
|
if (args.$length === 0) {
|
|
183659
|
-
return $ifaceNil;
|
|
183703
|
+
$s = -1; return $ifaceNil;
|
|
183660
183704
|
}
|
|
183661
183705
|
ev = $clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value);
|
|
183706
|
+
_r = $clone(ev, js.Value).Call("preventDefault", sliceType.nil); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
183707
|
+
_r;
|
|
183662
183708
|
changedTouches = $clone($clone(ev, js.Value).Get("changedTouches"), js.Value);
|
|
183663
183709
|
if ($clone(changedTouches, js.Value).IsUndefined() || $clone(changedTouches, js.Value).IsNull() || ($clone(changedTouches, js.Value).Length() === 0)) {
|
|
183664
|
-
return $ifaceNil;
|
|
183710
|
+
$s = -1; return $ifaceNil;
|
|
183665
183711
|
}
|
|
183666
183712
|
t = $clone($clone(changedTouches, js.Value).Index(0), js.Value);
|
|
183667
183713
|
d[0].emitTouchEvent($clone(new touch.Event.ptr(($fround($clone($clone(t, js.Value).Get("clientX"), js.Value).Float())), ($fround($clone($clone(t, js.Value).Get("clientY"), js.Value).Float())), (new touch.Sequence(0, $clone($clone(t, js.Value).Get("identifier"), js.Value).Int())), eventType[0]), touch.Event));
|
|
183668
|
-
return $ifaceNil;
|
|
183714
|
+
$s = -1; return $ifaceNil;
|
|
183715
|
+
/* */ } return; } var $f = {$blk: $b, $c: true, $r, _r, args, changedTouches, ev, t, this$1, $s};return $f;
|
|
183669
183716
|
}; })(d, eventName, eventType, handler, opts)), js.Func);
|
|
183670
183717
|
_r = $clone($clone(js.Global(), js.Value).Get("Object"), js.Value).New(sliceType.nil); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
183671
183718
|
opts[0] = $clone(_r, js.Value);
|
|
183672
|
-
$clone(opts[0], js.Value).Set("passive", new $Bool(
|
|
183719
|
+
$clone(opts[0], js.Value).Set("passive", new $Bool(false));
|
|
183673
183720
|
$clone(opts[0], js.Value).Set("capture", new $Bool(false));
|
|
183674
183721
|
_r$1 = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType([new $String(eventName[0]), new handler[0].constructor.elem(handler[0]), new opts[0].constructor.elem(opts[0])])); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
183675
183722
|
_r$1;
|
|
@@ -185736,14 +185783,18 @@ $packages["golang.org/x/exp/shiny/screen"] = (function() {
|
|
|
185736
185783
|
}
|
|
185737
185784
|
this.BackBufferPreserved = BackBufferPreserved_;
|
|
185738
185785
|
});
|
|
185739
|
-
NewWindowOptions = $pkg.NewWindowOptions = $newType(0, $kindStruct, "screen.NewWindowOptions", true, "golang.org/x/exp/shiny/screen", true, function(Width_, Height_, Title_) {
|
|
185786
|
+
NewWindowOptions = $pkg.NewWindowOptions = $newType(0, $kindStruct, "screen.NewWindowOptions", true, "golang.org/x/exp/shiny/screen", true, function(X_, Y_, Width_, Height_, Title_) {
|
|
185740
185787
|
this.$val = this;
|
|
185741
185788
|
if (arguments.length === 0) {
|
|
185789
|
+
this.X = 0;
|
|
185790
|
+
this.Y = 0;
|
|
185742
185791
|
this.Width = 0;
|
|
185743
185792
|
this.Height = 0;
|
|
185744
185793
|
this.Title = "";
|
|
185745
185794
|
return;
|
|
185746
185795
|
}
|
|
185796
|
+
this.X = X_;
|
|
185797
|
+
this.Y = Y_;
|
|
185747
185798
|
this.Width = Width_;
|
|
185748
185799
|
this.Height = Height_;
|
|
185749
185800
|
this.Title = Title_;
|
|
@@ -185790,7 +185841,7 @@ $packages["golang.org/x/exp/shiny/screen"] = (function() {
|
|
|
185790
185841
|
Texture.init([{prop: "Bounds", name: "Bounds", pkg: "", typ: $funcType([], [image.Rectangle], false)}, {prop: "Fill", name: "Fill", pkg: "", typ: $funcType([image.Rectangle, color.Color, draw.Op], [], false)}, {prop: "Release", name: "Release", pkg: "", typ: $funcType([], [], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [image.Point], false)}, {prop: "Upload", name: "Upload", pkg: "", typ: $funcType([image.Point, Buffer, image.Rectangle], [], false)}, {prop: "UploadYCbCr", name: "UploadYCbCr", pkg: "", typ: $funcType([image.Point, Buffer, image.Rectangle], [], false)}]);
|
|
185791
185842
|
Window.init([{prop: "Copy", name: "Copy", pkg: "", typ: $funcType([image.Point, Texture, image.Rectangle, draw.Op, ptrType$3], [], false)}, {prop: "Draw", name: "Draw", pkg: "", typ: $funcType([f64.Aff3, Texture, image.Rectangle, draw.Op, ptrType$3], [], false)}, {prop: "DrawUniform", name: "DrawUniform", pkg: "", typ: $funcType([f64.Aff3, color.Color, image.Rectangle, draw.Op, ptrType$3], [], false)}, {prop: "Fill", name: "Fill", pkg: "", typ: $funcType([image.Rectangle, color.Color, draw.Op], [], false)}, {prop: "NextEvent", name: "NextEvent", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "Publish", name: "Publish", pkg: "", typ: $funcType([], [PublishResult], false)}, {prop: "Release", name: "Release", pkg: "", typ: $funcType([], [], false)}, {prop: "Scale", name: "Scale", pkg: "", typ: $funcType([image.Rectangle, Texture, image.Rectangle, draw.Op, ptrType$3], [], false)}, {prop: "Send", name: "Send", pkg: "", typ: $funcType([$emptyInterface], [], false)}, {prop: "SendFirst", name: "SendFirst", pkg: "", typ: $funcType([$emptyInterface], [], false)}, {prop: "Upload", name: "Upload", pkg: "", typ: $funcType([image.Point, Buffer, image.Rectangle], [], false)}, {prop: "UploadYCbCr", name: "UploadYCbCr", pkg: "", typ: $funcType([image.Point, Buffer, image.Rectangle], [], false)}]);
|
|
185792
185843
|
PublishResult.init("", [{prop: "BackBufferPreserved", name: "BackBufferPreserved", embedded: false, exported: true, typ: $Bool, tag: ""}]);
|
|
185793
|
-
NewWindowOptions.init("", [{prop: "Width", name: "Width", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Height", name: "Height", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Title", name: "Title", embedded: false, exported: true, typ: $String, tag: ""}]);
|
|
185844
|
+
NewWindowOptions.init("", [{prop: "X", name: "X", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Y", name: "Y", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Width", name: "Width", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Height", name: "Height", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Title", name: "Title", embedded: false, exported: true, typ: $String, tag: ""}]);
|
|
185794
185845
|
DrawOptions.init("", []);
|
|
185795
185846
|
$init = function() {
|
|
185796
185847
|
$pkg.$init = function() {};
|
|
@@ -186158,15 +186209,14 @@ $packages["github.com/supraio/client-daemon/pkg/decoder/nacldecoder/nacldriver"]
|
|
|
186158
186209
|
return $pkg;
|
|
186159
186210
|
})();
|
|
186160
186211
|
$packages["github.com/supraio/client-daemon/pkg/render/frame"] = (function() {
|
|
186161
|
-
var $pkg = {}, $init, time, FrameType, FrameInterface,
|
|
186212
|
+
var $pkg = {}, $init, js, time, JSFrame, FrameType, FrameInterface, funcType, arrayType, sliceType, ptrType, NewJSFrame;
|
|
186213
|
+
js = $packages["syscall/js"];
|
|
186162
186214
|
time = $packages["time"];
|
|
186163
|
-
|
|
186164
|
-
FrameInterface = $pkg.FrameInterface = $newType(8, $kindInterface, "frame.FrameInterface", true, "github.com/supraio/client-daemon/pkg/render/frame", true, null);
|
|
186165
|
-
Frame = $pkg.Frame = $newType(0, $kindStruct, "frame.Frame", true, "github.com/supraio/client-daemon/pkg/render/frame", true, function(frameType_, buffer_, timestamp_) {
|
|
186215
|
+
JSFrame = $pkg.JSFrame = $newType(0, $kindStruct, "frame.JSFrame", true, "github.com/supraio/client-daemon/pkg/render/frame", true, function(frameType_, buffer_, timestamp_) {
|
|
186166
186216
|
this.$val = this;
|
|
186167
186217
|
if (arguments.length === 0) {
|
|
186168
186218
|
this.frameType = 0;
|
|
186169
|
-
this.buffer =
|
|
186219
|
+
this.buffer = new js.Value.ptr(null, false, arrayType.zero());
|
|
186170
186220
|
this.timestamp = new $Uint64(0, 0);
|
|
186171
186221
|
return;
|
|
186172
186222
|
}
|
|
@@ -186174,54 +186224,74 @@ $packages["github.com/supraio/client-daemon/pkg/render/frame"] = (function() {
|
|
|
186174
186224
|
this.buffer = buffer_;
|
|
186175
186225
|
this.timestamp = timestamp_;
|
|
186176
186226
|
});
|
|
186227
|
+
FrameType = $pkg.FrameType = $newType(1, $kindUint8, "frame.FrameType", true, "github.com/supraio/client-daemon/pkg/render/frame", true, null);
|
|
186228
|
+
FrameInterface = $pkg.FrameInterface = $newType(8, $kindInterface, "frame.FrameInterface", true, "github.com/supraio/client-daemon/pkg/render/frame", true, null);
|
|
186229
|
+
funcType = $funcType([], [], false);
|
|
186230
|
+
arrayType = $arrayType(funcType, 0);
|
|
186177
186231
|
sliceType = $sliceType($Uint8);
|
|
186178
|
-
ptrType = $ptrType(
|
|
186179
|
-
|
|
186232
|
+
ptrType = $ptrType(JSFrame);
|
|
186233
|
+
NewJSFrame = function(frameType, buffer, timestamp) {
|
|
186180
186234
|
var buffer, frameType, timestamp;
|
|
186181
|
-
return new
|
|
186235
|
+
return new JSFrame.ptr(frameType, $clone(buffer, js.Value), timestamp);
|
|
186182
186236
|
};
|
|
186183
|
-
$pkg.
|
|
186184
|
-
|
|
186237
|
+
$pkg.NewJSFrame = NewJSFrame;
|
|
186238
|
+
JSFrame.ptr.prototype.FrameType = function() {
|
|
186185
186239
|
var f;
|
|
186186
186240
|
f = this;
|
|
186187
186241
|
return f.frameType;
|
|
186188
186242
|
};
|
|
186189
|
-
|
|
186190
|
-
|
|
186243
|
+
JSFrame.prototype.FrameType = function() { return this.$val.FrameType(); };
|
|
186244
|
+
JSFrame.ptr.prototype.Buffer = function() {
|
|
186245
|
+
var f;
|
|
186246
|
+
f = this;
|
|
186247
|
+
return sliceType.nil;
|
|
186248
|
+
};
|
|
186249
|
+
JSFrame.prototype.Buffer = function() { return this.$val.Buffer(); };
|
|
186250
|
+
JSFrame.ptr.prototype.JSBuffer = function() {
|
|
186191
186251
|
var f;
|
|
186192
186252
|
f = this;
|
|
186193
186253
|
return f.buffer;
|
|
186194
186254
|
};
|
|
186195
|
-
|
|
186196
|
-
|
|
186255
|
+
JSFrame.prototype.JSBuffer = function() { return this.$val.JSBuffer(); };
|
|
186256
|
+
JSFrame.ptr.prototype.ByteLength = function() {
|
|
186257
|
+
var f;
|
|
186258
|
+
f = this;
|
|
186259
|
+
return $clone($clone(f.buffer, js.Value).Get("byteLength"), js.Value).Int();
|
|
186260
|
+
};
|
|
186261
|
+
JSFrame.prototype.ByteLength = function() { return this.$val.ByteLength(); };
|
|
186262
|
+
JSFrame.ptr.prototype.GetTimestamp = function() {
|
|
186197
186263
|
var f, x;
|
|
186198
186264
|
f = this;
|
|
186199
186265
|
return time.Unix(new $Int64(0, 0), ((x = f.timestamp, new $Int64(x.$high, x.$low))));
|
|
186200
186266
|
};
|
|
186201
|
-
|
|
186202
|
-
ptrType.methods = [{prop: "FrameType", name: "FrameType", pkg: "", typ: $funcType([], [FrameType], false)}, {prop: "Buffer", name: "Buffer", pkg: "", typ: $funcType([], [sliceType], false)}, {prop: "GetTimestamp", name: "GetTimestamp", pkg: "", typ: $funcType([], [time.Time], false)}];
|
|
186267
|
+
JSFrame.prototype.GetTimestamp = function() { return this.$val.GetTimestamp(); };
|
|
186268
|
+
ptrType.methods = [{prop: "FrameType", name: "FrameType", pkg: "", typ: $funcType([], [FrameType], false)}, {prop: "Buffer", name: "Buffer", pkg: "", typ: $funcType([], [sliceType], false)}, {prop: "JSBuffer", name: "JSBuffer", pkg: "", typ: $funcType([], [js.Value], false)}, {prop: "ByteLength", name: "ByteLength", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetTimestamp", name: "GetTimestamp", pkg: "", typ: $funcType([], [time.Time], false)}];
|
|
186269
|
+
JSFrame.init("github.com/supraio/client-daemon/pkg/render/frame", [{prop: "frameType", name: "frameType", embedded: false, exported: false, typ: FrameType, tag: ""}, {prop: "buffer", name: "buffer", embedded: false, exported: false, typ: js.Value, tag: ""}, {prop: "timestamp", name: "timestamp", embedded: false, exported: false, typ: $Uint64, tag: ""}]);
|
|
186203
186270
|
FrameInterface.init([{prop: "Buffer", name: "Buffer", pkg: "", typ: $funcType([], [sliceType], false)}, {prop: "FrameType", name: "FrameType", pkg: "", typ: $funcType([], [FrameType], false)}, {prop: "GetTimestamp", name: "GetTimestamp", pkg: "", typ: $funcType([], [time.Time], false)}]);
|
|
186204
|
-
Frame.init("github.com/supraio/client-daemon/pkg/render/frame", [{prop: "frameType", name: "frameType", embedded: false, exported: false, typ: FrameType, tag: ""}, {prop: "buffer", name: "buffer", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "timestamp", name: "timestamp", embedded: false, exported: false, typ: $Uint64, tag: ""}]);
|
|
186205
186271
|
$init = function() {
|
|
186206
186272
|
$pkg.$init = function() {};
|
|
186207
186273
|
/* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
186208
|
-
$r =
|
|
186274
|
+
$r = js.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
186275
|
+
$r = time.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
186209
186276
|
/* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
|
|
186210
186277
|
};
|
|
186211
186278
|
$pkg.$init = $init;
|
|
186212
186279
|
return $pkg;
|
|
186213
186280
|
})();
|
|
186214
186281
|
$packages["github.com/supraio/client-daemon/pkg/render/netframe"] = (function() {
|
|
186215
|
-
var $pkg = {}, $init, binary, errs, netpacket, frame, frameCollectorFactories, RegisterFrameCollector;
|
|
186282
|
+
var $pkg = {}, $init, binary, errs, netpacket, frame, time, FrameCollectionDurationCallback, frameCollectorFactories, RegisterFrameCollector;
|
|
186216
186283
|
binary = $packages["encoding/binary"];
|
|
186217
186284
|
errs = $packages["github.com/supraio/client-daemon/pkg/errs"];
|
|
186218
186285
|
netpacket = $packages["github.com/supraio/client-daemon/pkg/netpacket"];
|
|
186219
186286
|
frame = $packages["github.com/supraio/client-daemon/pkg/render/frame"];
|
|
186287
|
+
time = $packages["time"];
|
|
186288
|
+
FrameCollectionDurationCallback = $pkg.FrameCollectionDurationCallback = $newType(4, $kindFunc, "netframe.FrameCollectionDurationCallback", true, "github.com/supraio/client-daemon/pkg/render/netframe", true, null);
|
|
186220
186289
|
RegisterFrameCollector = function(name, factory) {
|
|
186221
186290
|
var _key, factory, name;
|
|
186222
186291
|
_key = name; (frameCollectorFactories || $throwRuntimeError("assignment to entry in nil map")).set($String.keyFor(_key), { k: _key, v: factory });
|
|
186223
186292
|
};
|
|
186224
186293
|
$pkg.RegisterFrameCollector = RegisterFrameCollector;
|
|
186294
|
+
FrameCollectionDurationCallback.init([time.Duration], [], false);
|
|
186225
186295
|
$init = function() {
|
|
186226
186296
|
$pkg.$init = function() {};
|
|
186227
186297
|
/* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
@@ -186229,6 +186299,7 @@ $packages["github.com/supraio/client-daemon/pkg/render/netframe"] = (function()
|
|
|
186229
186299
|
$r = errs.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
186230
186300
|
$r = netpacket.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
186231
186301
|
$r = frame.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
186302
|
+
$r = time.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
186232
186303
|
frameCollectorFactories = new $global.Map();
|
|
186233
186304
|
/* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
|
|
186234
186305
|
};
|
|
@@ -186297,8 +186368,8 @@ $packages["github.com/supraio/client-daemon/pkg/render/netframe/nacltcp"] = (fun
|
|
|
186297
186368
|
/* */ } return; } var $f = {$blk: NewNaClTCPFrameCollector, $c: true, $r, _ref, maxPacketSize, screenConn, screenConnTyped, screenConnTyped$1, $s};return $f;
|
|
186298
186369
|
};
|
|
186299
186370
|
$pkg.NewNaClTCPFrameCollector = NewNaClTCPFrameCollector;
|
|
186300
|
-
NTFrameCollector.ptr.prototype.CollectFrame = function(startCb, endCb) {
|
|
186301
|
-
var {$24r, $24r$1, _arg, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _tuple, c, collectPromise, collectedFrame, endCb, err, frame$1, jsConn, onEnd, onStart, opts, startCb, timestampHi, timestampLo, x, $s, $deferred, $r, $c} = $restore(this, {startCb, endCb});
|
|
186371
|
+
NTFrameCollector.ptr.prototype.CollectFrame = function(startCb, endCb, param) {
|
|
186372
|
+
var {$24r, $24r$1, _arg, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _tuple, c, collectPromise, collectedFrame, endCb, err, frame$1, jsConn, onEnd, onStart, opts, param, startCb, timestampHi, timestampLo, x, $s, $deferred, $r, $c} = $restore(this, {startCb, endCb, param});
|
|
186302
186373
|
/* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred);
|
|
186303
186374
|
endCb = [endCb];
|
|
186304
186375
|
startCb = [startCb];
|
|
@@ -186345,9 +186416,9 @@ $packages["github.com/supraio/client-daemon/pkg/render/netframe/nacltcp"] = (fun
|
|
|
186345
186416
|
frame$1 = new NTFrame.ptr((($clone($clone(collectedFrame, js.Value).Get("frameType"), js.Value).Int() << 24 >>> 24)), (x = $shiftLeft64(timestampHi, 32), new $Uint64(timestampLo.$high | x.$high, (timestampLo.$low | x.$low) >>> 0)), (($clone($clone(collectedFrame, js.Value).Get("dataRef"), js.Value).Int() >>> 0)));
|
|
186346
186417
|
$24r$1 = [frame$1, $ifaceNil];
|
|
186347
186418
|
$s = 10; case 10: return $24r$1;
|
|
186348
|
-
/* */ } return; } } catch(err) { $err = err; $s = -1; return [$ifaceNil, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: NTFrameCollector.ptr.prototype.CollectFrame, $c: true, $r, $24r, $24r$1, _arg, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _tuple, c, collectPromise, collectedFrame, endCb, err, frame$1, jsConn, onEnd, onStart, opts, startCb, timestampHi, timestampLo, x, $s, $deferred};return $f; } }
|
|
186419
|
+
/* */ } return; } } catch(err) { $err = err; $s = -1; return [$ifaceNil, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: NTFrameCollector.ptr.prototype.CollectFrame, $c: true, $r, $24r, $24r$1, _arg, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _tuple, c, collectPromise, collectedFrame, endCb, err, frame$1, jsConn, onEnd, onStart, opts, param, startCb, timestampHi, timestampLo, x, $s, $deferred};return $f; } }
|
|
186349
186420
|
};
|
|
186350
|
-
NTFrameCollector.prototype.CollectFrame = function(startCb, endCb) { return this.$val.CollectFrame(startCb, endCb); };
|
|
186421
|
+
NTFrameCollector.prototype.CollectFrame = function(startCb, endCb, param) { return this.$val.CollectFrame(startCb, endCb, param); };
|
|
186351
186422
|
NTFrame.ptr.prototype.FrameType = function() {
|
|
186352
186423
|
var f;
|
|
186353
186424
|
f = this;
|
|
@@ -186375,7 +186446,7 @@ $packages["github.com/supraio/client-daemon/pkg/render/netframe/nacltcp"] = (fun
|
|
|
186375
186446
|
return f.dataRef;
|
|
186376
186447
|
};
|
|
186377
186448
|
NTFrame.prototype.DataRef = function() { return this.$val.DataRef(); };
|
|
186378
|
-
ptrType$2.methods = [{prop: "CollectFrame", name: "CollectFrame", pkg: "", typ: $funcType([funcType, funcType], [frame.FrameInterface, $error], false)}];
|
|
186449
|
+
ptrType$2.methods = [{prop: "CollectFrame", name: "CollectFrame", pkg: "", typ: $funcType([funcType, funcType, netframe.FrameCollectionDurationCallback], [frame.FrameInterface, $error], false)}];
|
|
186379
186450
|
ptrType$3.methods = [{prop: "FrameType", name: "FrameType", pkg: "", typ: $funcType([], [frame.FrameType], false)}, {prop: "Buffer", name: "Buffer", pkg: "", typ: $funcType([], [sliceType$1], false)}, {prop: "GetTimestamp", name: "GetTimestamp", pkg: "", typ: $funcType([], [time.Time], false)}, {prop: "DataRef", name: "DataRef", pkg: "", typ: $funcType([], [$Uint32], false)}];
|
|
186380
186451
|
NTFrameCollector.init("github.com/supraio/client-daemon/pkg/render/netframe/nacltcp", [{prop: "conn", name: "conn", embedded: false, exported: false, typ: netpacket.NaClTCPConn, tag: ""}]);
|
|
186381
186452
|
NTFrame.init("github.com/supraio/client-daemon/pkg/render/netframe/nacltcp", [{prop: "frameType", name: "frameType", embedded: false, exported: false, typ: frame.FrameType, tag: ""}, {prop: "timestamp", name: "timestamp", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "dataRef", name: "dataRef", embedded: false, exported: false, typ: $Uint32, tag: ""}]);
|
|
@@ -186398,7 +186469,7 @@ $packages["github.com/supraio/client-daemon/pkg/render/netframe/nacltcp"] = (fun
|
|
|
186398
186469
|
return $pkg;
|
|
186399
186470
|
})();
|
|
186400
186471
|
$packages["github.com/supraio/client-daemon/pkg/decoder/nacldecoder"] = (function() {
|
|
186401
|
-
var $pkg = {}, $init, general, jsdecoder, nacldriver, errs, jshelper, frame, nacltcp, sync, js;
|
|
186472
|
+
var $pkg = {}, $init, general, jsdecoder, nacldriver, errs, jshelper, frame, nacltcp, sync, atomic, js;
|
|
186402
186473
|
general = $packages["github.com/supraio/client-daemon/pkg/decoder/general"];
|
|
186403
186474
|
jsdecoder = $packages["github.com/supraio/client-daemon/pkg/decoder/nacldecoder/jsdecoder"];
|
|
186404
186475
|
nacldriver = $packages["github.com/supraio/client-daemon/pkg/decoder/nacldecoder/nacldriver"];
|
|
@@ -186407,6 +186478,7 @@ $packages["github.com/supraio/client-daemon/pkg/decoder/nacldecoder"] = (functio
|
|
|
186407
186478
|
frame = $packages["github.com/supraio/client-daemon/pkg/render/frame"];
|
|
186408
186479
|
nacltcp = $packages["github.com/supraio/client-daemon/pkg/render/netframe/nacltcp"];
|
|
186409
186480
|
sync = $packages["sync"];
|
|
186481
|
+
atomic = $packages["sync/atomic"];
|
|
186410
186482
|
js = $packages["syscall/js"];
|
|
186411
186483
|
$init = function() {
|
|
186412
186484
|
$pkg.$init = function() {};
|
|
@@ -186419,7 +186491,8 @@ $packages["github.com/supraio/client-daemon/pkg/decoder/nacldecoder"] = (functio
|
|
|
186419
186491
|
$r = frame.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
186420
186492
|
$r = nacltcp.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
186421
186493
|
$r = sync.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
186422
|
-
$r =
|
|
186494
|
+
$r = atomic.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
186495
|
+
$r = js.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
186423
186496
|
/* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
|
|
186424
186497
|
};
|
|
186425
186498
|
$pkg.$init = $init;
|
|
@@ -186503,8 +186576,8 @@ $packages["github.com/supraio/client-daemon/pkg/render/netframe/samsungwasmtcp"]
|
|
|
186503
186576
|
/* */ } return; } var $f = {$blk: NewSamsungWasmTCPFrameCollector, $c: true, $r, _ref, maxPacketSize, screenConn, screenConnTyped, screenConnTyped$1, $s};return $f;
|
|
186504
186577
|
};
|
|
186505
186578
|
$pkg.NewSamsungWasmTCPFrameCollector = NewSamsungWasmTCPFrameCollector;
|
|
186506
|
-
SWTFrameCollector.ptr.prototype.CollectFrame = function(startCb, endCb) {
|
|
186507
|
-
var {$24r, _arg, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _tuple, c, collectPromise, collectedFrame, endCb, err, frame$1, jsConn, opts, startCb, timestampHi, timestampLo, x, x$1, x$2, $s, $r, $c} = $restore(this, {startCb, endCb});
|
|
186579
|
+
SWTFrameCollector.ptr.prototype.CollectFrame = function(startCb, endCb, param) {
|
|
186580
|
+
var {$24r, _arg, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _tuple, c, collectPromise, collectedFrame, endCb, err, frame$1, jsConn, opts, param, startCb, timestampHi, timestampLo, x, x$1, x$2, $s, $r, $c} = $restore(this, {startCb, endCb, param});
|
|
186508
186581
|
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
186509
186582
|
endCb = [endCb];
|
|
186510
186583
|
startCb = [startCb];
|
|
@@ -186544,9 +186617,9 @@ $packages["github.com/supraio/client-daemon/pkg/render/netframe/samsungwasmtcp"]
|
|
|
186544
186617
|
timestampHi = (new $Uint64(0, (($clone($clone($clone(collectedFrame, js.Value).Get("timestamp"), js.Value).Get("hi"), js.Value).Int() >>> 0))));
|
|
186545
186618
|
frame$1 = new SWTFrame.ptr((($clone($clone(collectedFrame, js.Value).Get("frameType"), js.Value).Int() << 24 >>> 24)), (x$2 = $shiftLeft64(timestampHi, 32), new $Uint64(timestampLo.$high | x$2.$high, (timestampLo.$low | x$2.$low) >>> 0)), (($clone($clone(collectedFrame, js.Value).Get("dataRef"), js.Value).Int() >>> 0)));
|
|
186546
186619
|
$s = -1; return [frame$1, $ifaceNil];
|
|
186547
|
-
/* */ } return; } var $f = {$blk: SWTFrameCollector.ptr.prototype.CollectFrame, $c: true, $r, $24r, _arg, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _tuple, c, collectPromise, collectedFrame, endCb, err, frame$1, jsConn, opts, startCb, timestampHi, timestampLo, x, x$1, x$2, $s};return $f;
|
|
186620
|
+
/* */ } return; } var $f = {$blk: SWTFrameCollector.ptr.prototype.CollectFrame, $c: true, $r, $24r, _arg, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _tuple, c, collectPromise, collectedFrame, endCb, err, frame$1, jsConn, opts, param, startCb, timestampHi, timestampLo, x, x$1, x$2, $s};return $f;
|
|
186548
186621
|
};
|
|
186549
|
-
SWTFrameCollector.prototype.CollectFrame = function(startCb, endCb) { return this.$val.CollectFrame(startCb, endCb); };
|
|
186622
|
+
SWTFrameCollector.prototype.CollectFrame = function(startCb, endCb, param) { return this.$val.CollectFrame(startCb, endCb, param); };
|
|
186550
186623
|
SWTFrame.ptr.prototype.FrameType = function() {
|
|
186551
186624
|
var f;
|
|
186552
186625
|
f = this;
|
|
@@ -186574,7 +186647,7 @@ $packages["github.com/supraio/client-daemon/pkg/render/netframe/samsungwasmtcp"]
|
|
|
186574
186647
|
return f.dataRef;
|
|
186575
186648
|
};
|
|
186576
186649
|
SWTFrame.prototype.DataRef = function() { return this.$val.DataRef(); };
|
|
186577
|
-
ptrType$2.methods = [{prop: "CollectFrame", name: "CollectFrame", pkg: "", typ: $funcType([funcType, funcType], [frame.FrameInterface, $error], false)}];
|
|
186650
|
+
ptrType$2.methods = [{prop: "CollectFrame", name: "CollectFrame", pkg: "", typ: $funcType([funcType, funcType, netframe.FrameCollectionDurationCallback], [frame.FrameInterface, $error], false)}];
|
|
186578
186651
|
ptrType$3.methods = [{prop: "FrameType", name: "FrameType", pkg: "", typ: $funcType([], [frame.FrameType], false)}, {prop: "Buffer", name: "Buffer", pkg: "", typ: $funcType([], [sliceType$1], false)}, {prop: "GetTimestamp", name: "GetTimestamp", pkg: "", typ: $funcType([], [time.Time], false)}, {prop: "DataRef", name: "DataRef", pkg: "", typ: $funcType([], [$Uint32], false)}];
|
|
186579
186652
|
SWTFrameCollector.init("github.com/supraio/client-daemon/pkg/render/netframe/samsungwasmtcp", [{prop: "conn", name: "conn", embedded: false, exported: false, typ: netpacket.SamsungWasmTCPConn, tag: ""}]);
|
|
186580
186653
|
SWTFrame.init("github.com/supraio/client-daemon/pkg/render/netframe/samsungwasmtcp", [{prop: "frameType", name: "frameType", embedded: false, exported: false, typ: frame.FrameType, tag: ""}, {prop: "timestamp", name: "timestamp", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "dataRef", name: "dataRef", embedded: false, exported: false, typ: $Uint32, tag: ""}]);
|
|
@@ -191000,7 +191073,7 @@ $packages["golang.org/x/exp/shiny/driver/internal/errscreen"] = (function() {
|
|
|
191000
191073
|
return $pkg;
|
|
191001
191074
|
})();
|
|
191002
191075
|
$packages["golang.org/x/exp/shiny/driver/canvasdriver"] = (function() {
|
|
191003
|
-
var $pkg = {}, $init, fmt, errscreen, dom, screen, f64, image, color, draw, sync, js, windowImpl, screenImpl, YCbCrJS, BufferImpl, sliceType, ptrType, ptrType$1, funcType, arrayType, ptrType$
|
|
191076
|
+
var $pkg = {}, $init, fmt, errscreen, dom, screen, f64, image, color, draw, sync, js, windowImpl, screenImpl, YCbCrJS, BufferImpl, sliceType, ptrType, ptrType$1, ptrType$2, funcType, arrayType, ptrType$3, ptrType$4, sliceType$1, ptrType$5, ptrType$6, ptrType$7, ptrType$8, ptrType$9, ptrType$10, newWindow, newScreenImpl, main, newBuffer;
|
|
191004
191077
|
fmt = $packages["fmt"];
|
|
191005
191078
|
errscreen = $packages["golang.org/x/exp/shiny/driver/internal/errscreen"];
|
|
191006
191079
|
dom = $packages["golang.org/x/exp/shiny/driver/util/dom"];
|
|
@@ -191014,12 +191087,12 @@ $packages["golang.org/x/exp/shiny/driver/canvasdriver"] = (function() {
|
|
|
191014
191087
|
windowImpl = $pkg.windowImpl = $newType(0, $kindStruct, "canvasdriver.windowImpl", true, "golang.org/x/exp/shiny/driver/canvasdriver", false, function(screen_, mutex_, canvasEl_, ctx2d_, released_, domEvents_, resizeCallback_) {
|
|
191015
191088
|
this.$val = this;
|
|
191016
191089
|
if (arguments.length === 0) {
|
|
191017
|
-
this.screen = ptrType.nil;
|
|
191018
|
-
this.mutex = ptrType$
|
|
191090
|
+
this.screen = ptrType$1.nil;
|
|
191091
|
+
this.mutex = ptrType$2.nil;
|
|
191019
191092
|
this.canvasEl = new js.Value.ptr(null, false, arrayType.zero());
|
|
191020
191093
|
this.ctx2d = new js.Value.ptr(null, false, arrayType.zero());
|
|
191021
191094
|
this.released = false;
|
|
191022
|
-
this.domEvents = ptrType$
|
|
191095
|
+
this.domEvents = ptrType$3.nil;
|
|
191023
191096
|
this.resizeCallback = new js.Func.ptr(new js.Value.ptr(null, false, arrayType.zero()));
|
|
191024
191097
|
return;
|
|
191025
191098
|
}
|
|
@@ -191042,7 +191115,7 @@ $packages["golang.org/x/exp/shiny/driver/canvasdriver"] = (function() {
|
|
|
191042
191115
|
YCbCrJS = $pkg.YCbCrJS = $newType(0, $kindStruct, "canvasdriver.YCbCrJS", true, "golang.org/x/exp/shiny/driver/canvasdriver", true, function(CanvasImageSource_) {
|
|
191043
191116
|
this.$val = this;
|
|
191044
191117
|
if (arguments.length === 0) {
|
|
191045
|
-
this.CanvasImageSource = ptrType$
|
|
191118
|
+
this.CanvasImageSource = ptrType$6.nil;
|
|
191046
191119
|
return;
|
|
191047
191120
|
}
|
|
191048
191121
|
this.CanvasImageSource = CanvasImageSource_;
|
|
@@ -191050,13 +191123,13 @@ $packages["golang.org/x/exp/shiny/driver/canvasdriver"] = (function() {
|
|
|
191050
191123
|
BufferImpl = $pkg.BufferImpl = $newType(0, $kindStruct, "canvasdriver.BufferImpl", true, "golang.org/x/exp/shiny/driver/canvasdriver", true, function(screen_, size_, mutex_, released_, rgba_, ycbcr_, ycbcrJS_) {
|
|
191051
191124
|
this.$val = this;
|
|
191052
191125
|
if (arguments.length === 0) {
|
|
191053
|
-
this.screen = ptrType.nil;
|
|
191126
|
+
this.screen = ptrType$1.nil;
|
|
191054
191127
|
this.size = new image.Point.ptr(0, 0);
|
|
191055
|
-
this.mutex = ptrType$
|
|
191128
|
+
this.mutex = ptrType$2.nil;
|
|
191056
191129
|
this.released = false;
|
|
191057
191130
|
this.rgba = new image.RGBA.ptr(sliceType$1.nil, 0, new image.Rectangle.ptr(new image.Point.ptr(0, 0), new image.Point.ptr(0, 0)));
|
|
191058
191131
|
this.ycbcr = new image.YCbCr.ptr(sliceType$1.nil, sliceType$1.nil, sliceType$1.nil, 0, 0, 0, new image.Rectangle.ptr(new image.Point.ptr(0, 0), new image.Point.ptr(0, 0)));
|
|
191059
|
-
this.ycbcrJS = ptrType$
|
|
191132
|
+
this.ycbcrJS = ptrType$5.nil;
|
|
191060
191133
|
return;
|
|
191061
191134
|
}
|
|
191062
191135
|
this.screen = screen_;
|
|
@@ -191068,31 +191141,50 @@ $packages["golang.org/x/exp/shiny/driver/canvasdriver"] = (function() {
|
|
|
191068
191141
|
this.ycbcrJS = ycbcrJS_;
|
|
191069
191142
|
});
|
|
191070
191143
|
sliceType = $sliceType($emptyInterface);
|
|
191071
|
-
ptrType = $ptrType(
|
|
191072
|
-
ptrType$1 = $ptrType(
|
|
191144
|
+
ptrType = $ptrType(screen.NewWindowOptions);
|
|
191145
|
+
ptrType$1 = $ptrType(screenImpl);
|
|
191146
|
+
ptrType$2 = $ptrType(sync.Mutex);
|
|
191073
191147
|
funcType = $funcType([], [], false);
|
|
191074
191148
|
arrayType = $arrayType(funcType, 0);
|
|
191075
|
-
ptrType$
|
|
191076
|
-
ptrType$
|
|
191149
|
+
ptrType$3 = $ptrType(dom.DomEvents);
|
|
191150
|
+
ptrType$4 = $ptrType(BufferImpl);
|
|
191077
191151
|
sliceType$1 = $sliceType($Uint8);
|
|
191078
|
-
ptrType$
|
|
191079
|
-
ptrType$
|
|
191080
|
-
ptrType$
|
|
191081
|
-
ptrType$
|
|
191082
|
-
ptrType$8 = $ptrType(screen.NewWindowOptions);
|
|
191152
|
+
ptrType$5 = $ptrType(YCbCrJS);
|
|
191153
|
+
ptrType$6 = $ptrType(js.Value);
|
|
191154
|
+
ptrType$7 = $ptrType(screen.DrawOptions);
|
|
191155
|
+
ptrType$8 = $ptrType(windowImpl);
|
|
191083
191156
|
ptrType$9 = $ptrType(image.RGBA);
|
|
191084
191157
|
ptrType$10 = $ptrType(image.YCbCr);
|
|
191085
191158
|
newWindow = function(screen$1, opts) {
|
|
191086
|
-
var {_r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, adaptCanvas, canvasEl, ctx2d, domEvents, opts, resizeCallback, screen$1, w, $s, $r, $c} = $restore(this, {screen$1, opts});
|
|
191159
|
+
var {_arg, _arg$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, adaptCanvas, canvasEl, ctx2d, domEvents, hasGeometry, opts, resizeCallback, screen$1, style, w, $s, $r, $c} = $restore(this, {screen$1, opts});
|
|
191087
191160
|
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
191088
191161
|
adaptCanvas = [adaptCanvas];
|
|
191089
191162
|
canvasEl = [canvasEl];
|
|
191163
|
+
hasGeometry = [hasGeometry];
|
|
191090
191164
|
_r = $clone(screen$1.doc, js.Value).Call("createElement", new sliceType([new $String("canvas")])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
191091
191165
|
canvasEl[0] = $clone(_r, js.Value);
|
|
191092
191166
|
_r$1 = $clone($clone(screen$1.doc, js.Value).Get("body"), js.Value).Call("appendChild", new sliceType([new canvasEl[0].constructor.elem(canvasEl[0])])); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
191093
191167
|
_r$1;
|
|
191094
|
-
|
|
191168
|
+
hasGeometry[0] = !(opts === ptrType.nil) && opts.Width > 0 && opts.Height > 0;
|
|
191169
|
+
/* */ if (hasGeometry[0]) { $s = 3; continue; }
|
|
191170
|
+
/* */ $s = 4; continue;
|
|
191171
|
+
/* if (hasGeometry[0]) { */ case 3:
|
|
191172
|
+
style = $clone($clone(canvasEl[0], js.Value).Get("style"), js.Value);
|
|
191173
|
+
$clone(style, js.Value).Set("position", new $String("absolute"));
|
|
191174
|
+
_r$2 = fmt.Sprintf("%dpx", new sliceType([new $Int(opts.X)])); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
191175
|
+
_arg = new $String(_r$2);
|
|
191176
|
+
$r = $clone(style, js.Value).Set("left", _arg); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191177
|
+
_r$3 = fmt.Sprintf("%dpx", new sliceType([new $Int(opts.Y)])); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
191178
|
+
_arg$1 = new $String(_r$3);
|
|
191179
|
+
$r = $clone(style, js.Value).Set("top", _arg$1); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191180
|
+
$clone(canvasEl[0], js.Value).Set("width", new $Int(opts.Width));
|
|
191181
|
+
$clone(canvasEl[0], js.Value).Set("height", new $Int(opts.Height));
|
|
191182
|
+
/* } */ case 4:
|
|
191183
|
+
adaptCanvas[0] = (function(adaptCanvas, canvasEl, hasGeometry) { return function() {
|
|
191095
191184
|
var height, scale, width;
|
|
191185
|
+
if (hasGeometry[0]) {
|
|
191186
|
+
return;
|
|
191187
|
+
}
|
|
191096
191188
|
scale = dom.GetBrowserZoomRatio();
|
|
191097
191189
|
width = (((dom.GetDocWidth()) / scale >> 0));
|
|
191098
191190
|
if (!(($clone($clone(canvasEl[0], js.Value).Get("width"), js.Value).Int() === width))) {
|
|
@@ -191102,47 +191194,47 @@ $packages["golang.org/x/exp/shiny/driver/canvasdriver"] = (function() {
|
|
|
191102
191194
|
if (!(($clone($clone(canvasEl[0], js.Value).Get("height"), js.Value).Int() === height))) {
|
|
191103
191195
|
$clone(canvasEl[0], js.Value).Set("height", new $Int(height));
|
|
191104
191196
|
}
|
|
191105
|
-
}; })(adaptCanvas, canvasEl);
|
|
191106
|
-
$r = adaptCanvas[0](); /* */ $s =
|
|
191107
|
-
resizeCallback = $clone(js.FuncOf((function(adaptCanvas, canvasEl) { return function $b(this$1, args) {
|
|
191197
|
+
}; })(adaptCanvas, canvasEl, hasGeometry);
|
|
191198
|
+
$r = adaptCanvas[0](); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191199
|
+
resizeCallback = $clone(js.FuncOf((function(adaptCanvas, canvasEl, hasGeometry) { return function $b(this$1, args) {
|
|
191108
191200
|
var {args, this$1, $s, $r, $c} = $restore(this, {this$1, args});
|
|
191109
191201
|
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
191110
191202
|
$r = adaptCanvas[0](); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191111
191203
|
$s = -1; return $ifaceNil;
|
|
191112
191204
|
/* */ } return; } var $f = {$blk: $b, $c: true, $r, args, this$1, $s};return $f;
|
|
191113
|
-
}; })(adaptCanvas, canvasEl)), js.Func);
|
|
191114
|
-
_r$
|
|
191115
|
-
_r$
|
|
191116
|
-
/* */ if (!((opts.Width === 0))) { $s =
|
|
191117
|
-
/* */ $s = 6; continue;
|
|
191118
|
-
/* if (!((opts.Width === 0))) { */ case 5:
|
|
191119
|
-
$r = dom.SetWindowWidth(opts.Width); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191120
|
-
/* } */ case 6:
|
|
191121
|
-
/* */ if (!((opts.Height === 0))) { $s = 8; continue; }
|
|
191122
|
-
/* */ $s = 9; continue;
|
|
191123
|
-
/* if (!((opts.Height === 0))) { */ case 8:
|
|
191124
|
-
$r = dom.SetWindowHeight(opts.Height); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191125
|
-
/* } */ case 9:
|
|
191126
|
-
/* */ if (!(opts.Title === "")) { $s = 11; continue; }
|
|
191205
|
+
}; })(adaptCanvas, canvasEl, hasGeometry)), js.Func);
|
|
191206
|
+
_r$4 = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType([new $String("resize"), new resizeCallback.constructor.elem(resizeCallback)])); /* */ $s = 10; case 10: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
|
|
191207
|
+
_r$4;
|
|
191208
|
+
/* */ if (!((opts.Width === 0))) { $s = 11; continue; }
|
|
191127
191209
|
/* */ $s = 12; continue;
|
|
191128
|
-
/* if (!(opts.
|
|
191129
|
-
|
|
191130
|
-
_r$4 = $clone(_r$3, js.Value).Call("item", new sliceType([new $Int(0)])); /* */ $s = 14; case 14: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
|
|
191131
|
-
$r = $clone(_r$4, js.Value).Set("innerHTML", new $String(opts.Title)); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191210
|
+
/* if (!((opts.Width === 0))) { */ case 11:
|
|
191211
|
+
$r = dom.SetWindowWidth(opts.Width); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191132
191212
|
/* } */ case 12:
|
|
191133
|
-
|
|
191134
|
-
|
|
191135
|
-
/*
|
|
191213
|
+
/* */ if (!((opts.Height === 0))) { $s = 14; continue; }
|
|
191214
|
+
/* */ $s = 15; continue;
|
|
191215
|
+
/* if (!((opts.Height === 0))) { */ case 14:
|
|
191216
|
+
$r = dom.SetWindowHeight(opts.Height); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191217
|
+
/* } */ case 15:
|
|
191218
|
+
/* */ if (!(opts.Title === "")) { $s = 17; continue; }
|
|
191136
191219
|
/* */ $s = 18; continue;
|
|
191137
|
-
/* if (
|
|
191138
|
-
_r$
|
|
191139
|
-
$
|
|
191220
|
+
/* if (!(opts.Title === "")) { */ case 17:
|
|
191221
|
+
_r$5 = $clone($clone(screen$1.doc, js.Value).Get("head"), js.Value).Call("getElementsByTagName", new sliceType([new $String("title")])); /* */ $s = 19; case 19: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
|
|
191222
|
+
_r$6 = $clone(_r$5, js.Value).Call("item", new sliceType([new $Int(0)])); /* */ $s = 20; case 20: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; }
|
|
191223
|
+
$r = $clone(_r$6, js.Value).Set("innerHTML", new $String(opts.Title)); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191140
191224
|
/* } */ case 18:
|
|
191225
|
+
_r$7 = $clone(canvasEl[0], js.Value).Call("getContext", new sliceType([new $String("2d")])); /* */ $s = 22; case 22: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; }
|
|
191226
|
+
ctx2d = $clone(_r$7, js.Value);
|
|
191227
|
+
/* */ if ($clone(ctx2d, js.Value).IsUndefined() || $clone(ctx2d, js.Value).IsNull()) { $s = 23; continue; }
|
|
191228
|
+
/* */ $s = 24; continue;
|
|
191229
|
+
/* if ($clone(ctx2d, js.Value).IsUndefined() || $clone(ctx2d, js.Value).IsNull()) { */ case 23:
|
|
191230
|
+
_r$8 = fmt.Errorf("Cannot get 2d context of canvas", sliceType.nil); /* */ $s = 25; case 25: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; }
|
|
191231
|
+
$panic(_r$8);
|
|
191232
|
+
/* } */ case 24:
|
|
191141
191233
|
domEvents = dom.NewDomEvents();
|
|
191142
|
-
w = new windowImpl.ptr(screen$1, ptrType$
|
|
191143
|
-
$r = domEvents.BindEvents(); /* */ $s =
|
|
191234
|
+
w = new windowImpl.ptr(screen$1, ptrType$2.nil, $clone(canvasEl[0], js.Value), $clone(ctx2d, js.Value), false, domEvents, $clone(resizeCallback, js.Func));
|
|
191235
|
+
$r = domEvents.BindEvents(); /* */ $s = 26; case 26: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191144
191236
|
$s = -1; return w;
|
|
191145
|
-
/* */ } return; } var $f = {$blk: newWindow, $c: true, $r, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, adaptCanvas, canvasEl, ctx2d, domEvents, opts, resizeCallback, screen$1, w, $s};return $f;
|
|
191237
|
+
/* */ } return; } var $f = {$blk: newWindow, $c: true, $r, _arg, _arg$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, adaptCanvas, canvasEl, ctx2d, domEvents, hasGeometry, opts, resizeCallback, screen$1, style, w, $s};return $f;
|
|
191146
191238
|
};
|
|
191147
191239
|
windowImpl.ptr.prototype.Release = function() {
|
|
191148
191240
|
var {_r, _r$1, w, x, $s, $deferred, $r, $c} = $restore(this, {});
|
|
@@ -191224,9 +191316,9 @@ $packages["golang.org/x/exp/shiny/driver/canvasdriver"] = (function() {
|
|
|
191224
191316
|
$s = -1; return;
|
|
191225
191317
|
}
|
|
191226
191318
|
_ref = src;
|
|
191227
|
-
/* */ if ($assertType(_ref, ptrType$
|
|
191319
|
+
/* */ if ($assertType(_ref, ptrType$4, true)[1]) { $s = 1; continue; }
|
|
191228
191320
|
/* */ $s = 2; continue;
|
|
191229
|
-
/* if ($assertType(_ref, ptrType$
|
|
191321
|
+
/* if ($assertType(_ref, ptrType$4, true)[1]) { */ case 1:
|
|
191230
191322
|
jsSrc = _ref.$val;
|
|
191231
191323
|
_r = $clone(w.ctx2d, js.Value).Call("drawImage", new sliceType([(x = jsSrc.YCbCrJS().CanvasImageSource, new x.constructor.elem(x)), new $Int(0), new $Int(0)])); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
191232
191324
|
_r;
|
|
@@ -191334,7 +191426,7 @@ $packages["golang.org/x/exp/shiny/driver/canvasdriver"] = (function() {
|
|
|
191334
191426
|
newBuffer = function(screen$1, size) {
|
|
191335
191427
|
var _q, _q$1, _q$2, b, rect, screen$1, size;
|
|
191336
191428
|
rect = new image.Rectangle.ptr(new image.Point.ptr(0, 0), $clone(size, image.Point));
|
|
191337
|
-
b = new BufferImpl.ptr(screen$1, $clone(size, image.Point), new sync.Mutex.ptr(0, 0), false, $clone(new image.RGBA.ptr($makeSlice(sliceType$1, ($imul(($imul(4, size.X)), size.Y))), $imul(4, size.X), $clone(rect, image.Rectangle)), image.RGBA), $clone(new image.YCbCr.ptr($makeSlice(sliceType$1, ($imul(size.X, size.Y))), $makeSlice(sliceType$1, (_q$1 = ($imul(size.X, size.Y)) / 4, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero"))), $makeSlice(sliceType$1, (_q$2 = ($imul(size.X, size.Y)) / 4, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero"))), size.X, (_q = size.X / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")), 2, $clone(rect, image.Rectangle)), image.YCbCr), ptrType$
|
|
191429
|
+
b = new BufferImpl.ptr(screen$1, $clone(size, image.Point), new sync.Mutex.ptr(0, 0), false, $clone(new image.RGBA.ptr($makeSlice(sliceType$1, ($imul(($imul(4, size.X)), size.Y))), $imul(4, size.X), $clone(rect, image.Rectangle)), image.RGBA), $clone(new image.YCbCr.ptr($makeSlice(sliceType$1, ($imul(size.X, size.Y))), $makeSlice(sliceType$1, (_q$1 = ($imul(size.X, size.Y)) / 4, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero"))), $makeSlice(sliceType$1, (_q$2 = ($imul(size.X, size.Y)) / 4, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero"))), size.X, (_q = size.X / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")), 2, $clone(rect, image.Rectangle)), image.YCbCr), ptrType$5.nil);
|
|
191338
191430
|
return b;
|
|
191339
191431
|
};
|
|
191340
191432
|
BufferImpl.ptr.prototype.Size = function() {
|
|
@@ -191364,8 +191456,8 @@ $packages["golang.org/x/exp/shiny/driver/canvasdriver"] = (function() {
|
|
|
191364
191456
|
BufferImpl.ptr.prototype.YCbCrJS = function() {
|
|
191365
191457
|
var b;
|
|
191366
191458
|
b = this;
|
|
191367
|
-
if (b.ycbcrJS === ptrType$
|
|
191368
|
-
b.ycbcrJS = new YCbCrJS.ptr(ptrType$
|
|
191459
|
+
if (b.ycbcrJS === ptrType$5.nil) {
|
|
191460
|
+
b.ycbcrJS = new YCbCrJS.ptr(ptrType$6.nil);
|
|
191369
191461
|
}
|
|
191370
191462
|
return b.ycbcrJS;
|
|
191371
191463
|
};
|
|
@@ -191386,13 +191478,13 @@ $packages["golang.org/x/exp/shiny/driver/canvasdriver"] = (function() {
|
|
|
191386
191478
|
/* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: BufferImpl.ptr.prototype.Release, $c: true, $r, b, $s, $deferred};return $f; } }
|
|
191387
191479
|
};
|
|
191388
191480
|
BufferImpl.prototype.Release = function() { return this.$val.Release(); };
|
|
191389
|
-
ptrType$
|
|
191390
|
-
ptrType.methods = [{prop: "NewBuffer", name: "NewBuffer", pkg: "", typ: $funcType([image.Point], [screen.Buffer, $error], false)}, {prop: "NewTexture", name: "NewTexture", pkg: "", typ: $funcType([image.Point], [screen.Texture, $error], false)}, {prop: "NewWindow", name: "NewWindow", pkg: "", typ: $funcType([ptrType
|
|
191391
|
-
ptrType$
|
|
191392
|
-
windowImpl.init("golang.org/x/exp/shiny/driver/canvasdriver", [{prop: "screen", name: "screen", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "mutex", name: "mutex", embedded: false, exported: false, typ: ptrType$
|
|
191481
|
+
ptrType$8.methods = [{prop: "Release", name: "Release", pkg: "", typ: $funcType([], [], false)}, {prop: "Publish", name: "Publish", pkg: "", typ: $funcType([], [screen.PublishResult], false)}, {prop: "Send", name: "Send", pkg: "", typ: $funcType([$emptyInterface], [], false)}, {prop: "SendFirst", name: "SendFirst", pkg: "", typ: $funcType([$emptyInterface], [], false)}, {prop: "NextEvent", name: "NextEvent", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "Upload", name: "Upload", pkg: "", typ: $funcType([image.Point, screen.Buffer, image.Rectangle], [], false)}, {prop: "UploadYCbCr", name: "UploadYCbCr", pkg: "", typ: $funcType([image.Point, screen.Buffer, image.Rectangle], [], false)}, {prop: "Fill", name: "Fill", pkg: "", typ: $funcType([image.Rectangle, color.Color, draw.Op], [], false)}, {prop: "Draw", name: "Draw", pkg: "", typ: $funcType([f64.Aff3, screen.Texture, image.Rectangle, draw.Op, ptrType$7], [], false)}, {prop: "DrawUniform", name: "DrawUniform", pkg: "", typ: $funcType([f64.Aff3, color.Color, image.Rectangle, draw.Op, ptrType$7], [], false)}, {prop: "Copy", name: "Copy", pkg: "", typ: $funcType([image.Point, screen.Texture, image.Rectangle, draw.Op, ptrType$7], [], false)}, {prop: "Scale", name: "Scale", pkg: "", typ: $funcType([image.Rectangle, screen.Texture, image.Rectangle, draw.Op, ptrType$7], [], false)}];
|
|
191482
|
+
ptrType$1.methods = [{prop: "NewBuffer", name: "NewBuffer", pkg: "", typ: $funcType([image.Point], [screen.Buffer, $error], false)}, {prop: "NewTexture", name: "NewTexture", pkg: "", typ: $funcType([image.Point], [screen.Texture, $error], false)}, {prop: "NewWindow", name: "NewWindow", pkg: "", typ: $funcType([ptrType], [screen.Window, $error], false)}];
|
|
191483
|
+
ptrType$4.methods = [{prop: "Size", name: "Size", pkg: "", typ: $funcType([], [image.Point], false)}, {prop: "Bounds", name: "Bounds", pkg: "", typ: $funcType([], [image.Rectangle], false)}, {prop: "RGBA", name: "RGBA", pkg: "", typ: $funcType([], [ptrType$9], false)}, {prop: "YCbCr", name: "YCbCr", pkg: "", typ: $funcType([], [ptrType$10], false)}, {prop: "YCbCrJS", name: "YCbCrJS", pkg: "", typ: $funcType([], [ptrType$5], false)}, {prop: "Release", name: "Release", pkg: "", typ: $funcType([], [], false)}];
|
|
191484
|
+
windowImpl.init("golang.org/x/exp/shiny/driver/canvasdriver", [{prop: "screen", name: "screen", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "mutex", name: "mutex", embedded: false, exported: false, typ: ptrType$2, tag: ""}, {prop: "canvasEl", name: "canvasEl", embedded: false, exported: false, typ: js.Value, tag: ""}, {prop: "ctx2d", name: "ctx2d", embedded: false, exported: false, typ: js.Value, tag: ""}, {prop: "released", name: "released", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "domEvents", name: "domEvents", embedded: false, exported: false, typ: ptrType$3, tag: ""}, {prop: "resizeCallback", name: "resizeCallback", embedded: false, exported: false, typ: js.Func, tag: ""}]);
|
|
191393
191485
|
screenImpl.init("golang.org/x/exp/shiny/driver/canvasdriver", [{prop: "doc", name: "doc", embedded: false, exported: false, typ: js.Value, tag: ""}]);
|
|
191394
|
-
YCbCrJS.init("", [{prop: "CanvasImageSource", name: "CanvasImageSource", embedded: false, exported: true, typ: ptrType$
|
|
191395
|
-
BufferImpl.init("golang.org/x/exp/shiny/driver/canvasdriver", [{prop: "screen", name: "screen", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "size", name: "size", embedded: false, exported: false, typ: image.Point, tag: ""}, {prop: "mutex", name: "mutex", embedded: false, exported: false, typ: ptrType$
|
|
191486
|
+
YCbCrJS.init("", [{prop: "CanvasImageSource", name: "CanvasImageSource", embedded: false, exported: true, typ: ptrType$6, tag: ""}]);
|
|
191487
|
+
BufferImpl.init("golang.org/x/exp/shiny/driver/canvasdriver", [{prop: "screen", name: "screen", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "size", name: "size", embedded: false, exported: false, typ: image.Point, tag: ""}, {prop: "mutex", name: "mutex", embedded: false, exported: false, typ: ptrType$2, tag: ""}, {prop: "released", name: "released", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "rgba", name: "rgba", embedded: false, exported: false, typ: image.RGBA, tag: ""}, {prop: "ycbcr", name: "ycbcr", embedded: false, exported: false, typ: image.YCbCr, tag: ""}, {prop: "ycbcrJS", name: "ycbcrJS", embedded: false, exported: false, typ: ptrType$5, tag: ""}]);
|
|
191396
191488
|
$init = function() {
|
|
191397
191489
|
$pkg.$init = function() {};
|
|
191398
191490
|
/* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
@@ -191412,8 +191504,7 @@ $packages["golang.org/x/exp/shiny/driver/canvasdriver"] = (function() {
|
|
|
191412
191504
|
return $pkg;
|
|
191413
191505
|
})();
|
|
191414
191506
|
$packages["github.com/supraio/client-daemon/pkg/decoder/webcodecs"] = (function() {
|
|
191415
|
-
var $pkg = {}, $init,
|
|
191416
|
-
hex = $packages["encoding/hex"];
|
|
191507
|
+
var $pkg = {}, $init, webgl, general, errs, jshelper, frame, canvasdriver, image, js;
|
|
191417
191508
|
webgl = $packages["github.com/nuberu/webgl"];
|
|
191418
191509
|
general = $packages["github.com/supraio/client-daemon/pkg/decoder/general"];
|
|
191419
191510
|
errs = $packages["github.com/supraio/client-daemon/pkg/errs"];
|
|
@@ -191425,15 +191516,14 @@ $packages["github.com/supraio/client-daemon/pkg/decoder/webcodecs"] = (function(
|
|
|
191425
191516
|
$init = function() {
|
|
191426
191517
|
$pkg.$init = function() {};
|
|
191427
191518
|
/* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
191428
|
-
$r =
|
|
191429
|
-
$r =
|
|
191430
|
-
$r =
|
|
191431
|
-
$r =
|
|
191432
|
-
$r =
|
|
191433
|
-
$r =
|
|
191434
|
-
$r =
|
|
191435
|
-
$r =
|
|
191436
|
-
$r = js.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191519
|
+
$r = webgl.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191520
|
+
$r = general.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191521
|
+
$r = errs.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191522
|
+
$r = jshelper.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191523
|
+
$r = frame.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191524
|
+
$r = canvasdriver.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191525
|
+
$r = image.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191526
|
+
$r = js.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191437
191527
|
/* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
|
|
191438
191528
|
};
|
|
191439
191529
|
$pkg.$init = $init;
|
|
@@ -191476,11 +191566,14 @@ $packages["github.com/supraio/client-daemon/pkg/input"] = (function() {
|
|
|
191476
191566
|
return $pkg;
|
|
191477
191567
|
})();
|
|
191478
191568
|
$packages["github.com/supraio/client-daemon/pkg/render/netframe/jswebsocketworker"] = (function() {
|
|
191479
|
-
var $pkg = {}, $init, netpacket, frame, netframe, js, FrameCollector, ptrType, sliceType,
|
|
191569
|
+
var $pkg = {}, $init, errs, netpacket, frame, netframe, math, js, time, FrameCollector, ptrType, sliceType, funcType, ptrType$1, init, NewFrameCollector;
|
|
191570
|
+
errs = $packages["github.com/supraio/client-daemon/pkg/errs"];
|
|
191480
191571
|
netpacket = $packages["github.com/supraio/client-daemon/pkg/netpacket"];
|
|
191481
191572
|
frame = $packages["github.com/supraio/client-daemon/pkg/render/frame"];
|
|
191482
191573
|
netframe = $packages["github.com/supraio/client-daemon/pkg/render/netframe"];
|
|
191574
|
+
math = $packages["math"];
|
|
191483
191575
|
js = $packages["syscall/js"];
|
|
191576
|
+
time = $packages["time"];
|
|
191484
191577
|
FrameCollector = $pkg.FrameCollector = $newType(0, $kindStruct, "jswebsocketworker.FrameCollector", true, "github.com/supraio/client-daemon/pkg/render/netframe/jswebsocketworker", true, function(conn_) {
|
|
191485
191578
|
this.$val = this;
|
|
191486
191579
|
if (arguments.length === 0) {
|
|
@@ -191490,8 +191583,7 @@ $packages["github.com/supraio/client-daemon/pkg/render/netframe/jswebsocketworke
|
|
|
191490
191583
|
this.conn = conn_;
|
|
191491
191584
|
});
|
|
191492
191585
|
ptrType = $ptrType(netpacket.JsWebsocketWorkerConn);
|
|
191493
|
-
sliceType = $sliceType($
|
|
191494
|
-
sliceType$1 = $sliceType($emptyInterface);
|
|
191586
|
+
sliceType = $sliceType($emptyInterface);
|
|
191495
191587
|
funcType = $funcType([], [], false);
|
|
191496
191588
|
ptrType$1 = $ptrType(FrameCollector);
|
|
191497
191589
|
init = function() {
|
|
@@ -191508,48 +191600,66 @@ $packages["github.com/supraio/client-daemon/pkg/render/netframe/jswebsocketworke
|
|
|
191508
191600
|
return new FrameCollector.ptr(conn);
|
|
191509
191601
|
};
|
|
191510
191602
|
$pkg.NewFrameCollector = NewFrameCollector;
|
|
191511
|
-
FrameCollector.ptr.prototype.CollectFrame = function(
|
|
191512
|
-
var {$24r, $24r$1,
|
|
191513
|
-
/* */ $s = $s || 0;
|
|
191603
|
+
FrameCollector.ptr.prototype.CollectFrame = function(param, param$1, durationCb) {
|
|
191604
|
+
var {$24r, $24r$1, $24r$2, _r, _r$1, _r$2, _r$3, _tuple, byteLength, c, collectedFrame, collectionDurationMs, data, durationCb, err, firstPacketAt, firstPacketAtValue, frameLength, goReceivedAt, length, param, param$1, $s, $r, $c} = $restore(this, {param, param$1, durationCb});
|
|
191605
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
191514
191606
|
c = this;
|
|
191515
|
-
|
|
191516
|
-
$deferred.push([endCb, []]);
|
|
191517
|
-
_r = c.conn.CollectFrame(); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
191607
|
+
_r = c.conn.CollectFrame(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
191518
191608
|
_tuple = _r;
|
|
191519
191609
|
collectedFrame = _tuple[0];
|
|
191520
|
-
|
|
191521
|
-
|
|
191522
|
-
|
|
191523
|
-
|
|
191524
|
-
|
|
191525
|
-
$s = 5; case 5: return $24r;
|
|
191526
|
-
/* } */ case 4:
|
|
191610
|
+
goReceivedAt = _tuple[1];
|
|
191611
|
+
err = _tuple[2];
|
|
191612
|
+
if (!($interfaceIsEqual(err, $ifaceNil))) {
|
|
191613
|
+
$s = -1; return [$ifaceNil, err];
|
|
191614
|
+
}
|
|
191527
191615
|
data = $clone($clone(collectedFrame, js.Value).Get("data"), js.Value);
|
|
191528
|
-
|
|
191616
|
+
byteLength = $clone($clone(data, js.Value).Get("byteLength"), js.Value).Int();
|
|
191617
|
+
length = byteLength;
|
|
191529
191618
|
frameLength = $clone($clone(collectedFrame, js.Value).Get("length"), js.Value);
|
|
191530
191619
|
if (!$clone(frameLength, js.Value).IsUndefined() && !$clone(frameLength, js.Value).IsNull()) {
|
|
191531
191620
|
length = $clone(frameLength, js.Value).Int();
|
|
191532
191621
|
}
|
|
191533
|
-
|
|
191534
|
-
|
|
191535
|
-
|
|
191536
|
-
|
|
191537
|
-
|
|
191538
|
-
|
|
191539
|
-
|
|
191540
|
-
|
|
191541
|
-
/* */
|
|
191622
|
+
/* */ if (!((length === byteLength))) { $s = 2; continue; }
|
|
191623
|
+
/* */ $s = 3; continue;
|
|
191624
|
+
/* if (!((length === byteLength))) { */ case 2:
|
|
191625
|
+
_r$1 = errs.Errorf("Worker frame buffer length mismatch: expected %d, received %d", new sliceType([new $Int(length), new $Int(byteLength)])); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
191626
|
+
$24r = [$ifaceNil, _r$1];
|
|
191627
|
+
$s = 5; case 5: return $24r;
|
|
191628
|
+
/* } */ case 3:
|
|
191629
|
+
firstPacketAtValue = $clone($clone(collectedFrame, js.Value).Get("firstPacketAt"), js.Value);
|
|
191630
|
+
/* */ if (!(($clone(firstPacketAtValue, js.Value).Type() === 3))) { $s = 6; continue; }
|
|
191631
|
+
/* */ $s = 7; continue;
|
|
191632
|
+
/* if (!(($clone(firstPacketAtValue, js.Value).Type() === 3))) { */ case 6:
|
|
191633
|
+
_r$2 = errs.Errorf("Worker frame is missing first packet timestamp", sliceType.nil); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
191634
|
+
$24r$1 = [$ifaceNil, _r$2];
|
|
191635
|
+
$s = 9; case 9: return $24r$1;
|
|
191636
|
+
/* } */ case 7:
|
|
191637
|
+
firstPacketAt = $clone(firstPacketAtValue, js.Value).Float();
|
|
191638
|
+
collectionDurationMs = goReceivedAt - firstPacketAt;
|
|
191639
|
+
/* */ if (math.IsNaN(collectionDurationMs) || math.IsInf(collectionDurationMs, 0) || collectionDurationMs < 0) { $s = 10; continue; }
|
|
191640
|
+
/* */ $s = 11; continue;
|
|
191641
|
+
/* if (math.IsNaN(collectionDurationMs) || math.IsInf(collectionDurationMs, 0) || collectionDurationMs < 0) { */ case 10:
|
|
191642
|
+
_r$3 = errs.Errorf("Invalid worker frame collection duration: %fms", new sliceType([new $Float64(collectionDurationMs)])); /* */ $s = 12; case 12: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
191643
|
+
$24r$2 = [$ifaceNil, _r$3];
|
|
191644
|
+
$s = 13; case 13: return $24r$2;
|
|
191645
|
+
/* } */ case 11:
|
|
191646
|
+
$r = durationCb((new time.Duration(0, collectionDurationMs * 1e+06))); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191647
|
+
$s = -1; return [frame.NewJSFrame((($clone($clone(collectedFrame, js.Value).Get("frameType"), js.Value).Int() << 24 >>> 24)), $clone(data, js.Value), (new $Uint64(0, $clone($clone(collectedFrame, js.Value).Get("timestamp"), js.Value).Float()))), $ifaceNil];
|
|
191648
|
+
/* */ } return; } var $f = {$blk: FrameCollector.ptr.prototype.CollectFrame, $c: true, $r, $24r, $24r$1, $24r$2, _r, _r$1, _r$2, _r$3, _tuple, byteLength, c, collectedFrame, collectionDurationMs, data, durationCb, err, firstPacketAt, firstPacketAtValue, frameLength, goReceivedAt, length, param, param$1, $s};return $f;
|
|
191542
191649
|
};
|
|
191543
|
-
FrameCollector.prototype.CollectFrame = function(
|
|
191544
|
-
ptrType$1.methods = [{prop: "CollectFrame", name: "CollectFrame", pkg: "", typ: $funcType([funcType, funcType], [frame.FrameInterface, $error], false)}];
|
|
191650
|
+
FrameCollector.prototype.CollectFrame = function(param, param$1, durationCb) { return this.$val.CollectFrame(param, param$1, durationCb); };
|
|
191651
|
+
ptrType$1.methods = [{prop: "CollectFrame", name: "CollectFrame", pkg: "", typ: $funcType([funcType, funcType, netframe.FrameCollectionDurationCallback], [frame.FrameInterface, $error], false)}];
|
|
191545
191652
|
FrameCollector.init("github.com/supraio/client-daemon/pkg/render/netframe/jswebsocketworker", [{prop: "conn", name: "conn", embedded: false, exported: false, typ: ptrType, tag: ""}]);
|
|
191546
191653
|
$init = function() {
|
|
191547
191654
|
$pkg.$init = function() {};
|
|
191548
191655
|
/* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
191549
|
-
$r =
|
|
191550
|
-
$r =
|
|
191551
|
-
$r =
|
|
191552
|
-
$r =
|
|
191656
|
+
$r = errs.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191657
|
+
$r = netpacket.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191658
|
+
$r = frame.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191659
|
+
$r = netframe.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191660
|
+
$r = math.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191661
|
+
$r = js.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191662
|
+
$r = time.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191553
191663
|
init();
|
|
191554
191664
|
/* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
|
|
191555
191665
|
};
|
|
@@ -191590,7 +191700,7 @@ $packages["golang.org/x/exp/shiny/imageutil"] = (function() {
|
|
|
191590
191700
|
return $pkg;
|
|
191591
191701
|
})();
|
|
191592
191702
|
$packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
|
|
191593
|
-
var $pkg = {}, $init, fmt, webgl, types, errscreen, dom, imageutil, screen, f64, image, color, draw, sync, js, windowImpl, screenImpl, ArrayBufferSlice, YCbCrJS, BufferImpl, sliceType, sliceType$1, sliceType$2, ptrType, ptrType$1, funcType, arrayType, ptrType$
|
|
191703
|
+
var $pkg = {}, $init, fmt, webgl, types, errscreen, dom, imageutil, screen, f64, image, color, draw, sync, js, windowImpl, screenImpl, ArrayBufferSlice, YCbCrJS, BufferImpl, sliceType, sliceType$1, sliceType$2, ptrType, ptrType$1, ptrType$2, funcType, arrayType, ptrType$3, ptrType$4, ptrType$5, ptrType$6, ptrType$7, ptrType$8, sliceType$3, ptrType$9, ptrType$10, ptrType$11, ptrType$12, ptrType$13, ptrType$14, texCoordsVertices, elementsIndices, newWindow, main, newScreenImpl, newBuffer;
|
|
191594
191704
|
fmt = $packages["fmt"];
|
|
191595
191705
|
webgl = $packages["github.com/nuberu/webgl"];
|
|
191596
191706
|
types = $packages["github.com/nuberu/webgl/types"];
|
|
@@ -191607,19 +191717,19 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
|
|
|
191607
191717
|
windowImpl = $pkg.windowImpl = $newType(0, $kindStruct, "webgldriver.windowImpl", true, "golang.org/x/exp/shiny/driver/webgldriver", false, function(screen_, mutex_, canvasEl_, gl_, programRGBA_, imageTexRGBA_, programYUV420_, imageTexY_, imageTexU_, imageTexV_, vertexArray_, released_, domEvents_, width_, height_) {
|
|
191608
191718
|
this.$val = this;
|
|
191609
191719
|
if (arguments.length === 0) {
|
|
191610
|
-
this.screen = ptrType.nil;
|
|
191611
|
-
this.mutex = ptrType$
|
|
191720
|
+
this.screen = ptrType$1.nil;
|
|
191721
|
+
this.mutex = ptrType$2.nil;
|
|
191612
191722
|
this.canvasEl = new js.Value.ptr(null, false, arrayType.zero());
|
|
191613
|
-
this.gl = ptrType$
|
|
191614
|
-
this.programRGBA = ptrType$
|
|
191615
|
-
this.imageTexRGBA = ptrType$
|
|
191616
|
-
this.programYUV420 = ptrType$
|
|
191617
|
-
this.imageTexY = ptrType$
|
|
191618
|
-
this.imageTexU = ptrType$
|
|
191619
|
-
this.imageTexV = ptrType$
|
|
191620
|
-
this.vertexArray = ptrType$
|
|
191723
|
+
this.gl = ptrType$3.nil;
|
|
191724
|
+
this.programRGBA = ptrType$4.nil;
|
|
191725
|
+
this.imageTexRGBA = ptrType$5.nil;
|
|
191726
|
+
this.programYUV420 = ptrType$4.nil;
|
|
191727
|
+
this.imageTexY = ptrType$5.nil;
|
|
191728
|
+
this.imageTexU = ptrType$5.nil;
|
|
191729
|
+
this.imageTexV = ptrType$5.nil;
|
|
191730
|
+
this.vertexArray = ptrType$6.nil;
|
|
191621
191731
|
this.released = false;
|
|
191622
|
-
this.domEvents = ptrType$
|
|
191732
|
+
this.domEvents = ptrType$7.nil;
|
|
191623
191733
|
this.width = 0;
|
|
191624
191734
|
this.height = 0;
|
|
191625
191735
|
return;
|
|
@@ -191685,13 +191795,13 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
|
|
|
191685
191795
|
BufferImpl = $pkg.BufferImpl = $newType(0, $kindStruct, "webgldriver.BufferImpl", true, "golang.org/x/exp/shiny/driver/webgldriver", true, function(screen_, size_, mutex_, released_, rgba_, ycbcr_, ycbcrJS_) {
|
|
191686
191796
|
this.$val = this;
|
|
191687
191797
|
if (arguments.length === 0) {
|
|
191688
|
-
this.screen = ptrType.nil;
|
|
191798
|
+
this.screen = ptrType$1.nil;
|
|
191689
191799
|
this.size = new image.Point.ptr(0, 0);
|
|
191690
|
-
this.mutex = ptrType$
|
|
191800
|
+
this.mutex = ptrType$2.nil;
|
|
191691
191801
|
this.released = false;
|
|
191692
191802
|
this.rgba = new image.RGBA.ptr(sliceType$3.nil, 0, new image.Rectangle.ptr(new image.Point.ptr(0, 0), new image.Point.ptr(0, 0)));
|
|
191693
191803
|
this.ycbcr = new image.YCbCr.ptr(sliceType$3.nil, sliceType$3.nil, sliceType$3.nil, 0, 0, 0, new image.Rectangle.ptr(new image.Point.ptr(0, 0), new image.Point.ptr(0, 0)));
|
|
191694
|
-
this.ycbcrJS = ptrType$
|
|
191804
|
+
this.ycbcrJS = ptrType$9.nil;
|
|
191695
191805
|
return;
|
|
191696
191806
|
}
|
|
191697
191807
|
this.screen = screen_;
|
|
@@ -191705,62 +191815,80 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
|
|
|
191705
191815
|
sliceType = $sliceType($Float32);
|
|
191706
191816
|
sliceType$1 = $sliceType($Uint16);
|
|
191707
191817
|
sliceType$2 = $sliceType($emptyInterface);
|
|
191708
|
-
ptrType = $ptrType(
|
|
191709
|
-
ptrType$1 = $ptrType(
|
|
191818
|
+
ptrType = $ptrType(screen.NewWindowOptions);
|
|
191819
|
+
ptrType$1 = $ptrType(screenImpl);
|
|
191820
|
+
ptrType$2 = $ptrType(sync.Mutex);
|
|
191710
191821
|
funcType = $funcType([], [], false);
|
|
191711
191822
|
arrayType = $arrayType(funcType, 0);
|
|
191712
|
-
ptrType$
|
|
191713
|
-
ptrType$
|
|
191714
|
-
ptrType$
|
|
191715
|
-
ptrType$
|
|
191716
|
-
ptrType$
|
|
191717
|
-
ptrType$
|
|
191823
|
+
ptrType$3 = $ptrType(webgl.RenderingContext);
|
|
191824
|
+
ptrType$4 = $ptrType(types.Program);
|
|
191825
|
+
ptrType$5 = $ptrType(types.Texture);
|
|
191826
|
+
ptrType$6 = $ptrType(types.VertexArray);
|
|
191827
|
+
ptrType$7 = $ptrType(dom.DomEvents);
|
|
191828
|
+
ptrType$8 = $ptrType(BufferImpl);
|
|
191718
191829
|
sliceType$3 = $sliceType($Uint8);
|
|
191719
|
-
ptrType$
|
|
191720
|
-
ptrType$
|
|
191721
|
-
ptrType$
|
|
191722
|
-
ptrType$11 = $ptrType(screen.NewWindowOptions);
|
|
191830
|
+
ptrType$9 = $ptrType(YCbCrJS);
|
|
191831
|
+
ptrType$10 = $ptrType(screen.DrawOptions);
|
|
191832
|
+
ptrType$11 = $ptrType(windowImpl);
|
|
191723
191833
|
ptrType$12 = $ptrType(ArrayBufferSlice);
|
|
191724
191834
|
ptrType$13 = $ptrType(image.RGBA);
|
|
191725
191835
|
ptrType$14 = $ptrType(image.YCbCr);
|
|
191726
191836
|
newWindow = function(screen$1, opts) {
|
|
191727
|
-
var {_r, _r$1, _r$2, _r$3, _r$4, _r$5, _tuple, canvasEl, domEvents, err, gl, opts, screen$1, w, $s, $r, $c} = $restore(this, {screen$1, opts});
|
|
191837
|
+
var {_arg, _arg$1, _arg$2, _arg$3, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, canvasEl, domEvents, err, gl, opts, screen$1, style, w, $s, $r, $c} = $restore(this, {screen$1, opts});
|
|
191728
191838
|
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
191729
191839
|
_r = $clone(screen$1.doc, js.Value).Call("createElement", new sliceType$2([new $String("canvas")])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
191730
191840
|
canvasEl = $clone(_r, js.Value);
|
|
191731
191841
|
_r$1 = $clone($clone(screen$1.doc, js.Value).Get("body"), js.Value).Call("appendChild", new sliceType$2([new canvasEl.constructor.elem(canvasEl)])); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
191732
191842
|
_r$1;
|
|
191733
|
-
|
|
191734
|
-
|
|
191843
|
+
/* */ if (!(opts === ptrType.nil) && opts.Width > 0 && opts.Height > 0) { $s = 3; continue; }
|
|
191844
|
+
/* */ $s = 4; continue;
|
|
191845
|
+
/* if (!(opts === ptrType.nil) && opts.Width > 0 && opts.Height > 0) { */ case 3:
|
|
191846
|
+
style = $clone($clone(canvasEl, js.Value).Get("style"), js.Value);
|
|
191847
|
+
$clone(style, js.Value).Set("position", new $String("absolute"));
|
|
191848
|
+
_r$2 = fmt.Sprintf("%dpx", new sliceType$2([new $Int(opts.X)])); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
191849
|
+
_arg = new $String(_r$2);
|
|
191850
|
+
$r = $clone(style, js.Value).Set("left", _arg); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191851
|
+
_r$3 = fmt.Sprintf("%dpx", new sliceType$2([new $Int(opts.Y)])); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
191852
|
+
_arg$1 = new $String(_r$3);
|
|
191853
|
+
$r = $clone(style, js.Value).Set("top", _arg$1); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191854
|
+
_r$4 = fmt.Sprintf("%dpx", new sliceType$2([new $Int(opts.Width)])); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
|
|
191855
|
+
_arg$2 = new $String(_r$4);
|
|
191856
|
+
$r = $clone(style, js.Value).Set("width", _arg$2); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191857
|
+
_r$5 = fmt.Sprintf("%dpx", new sliceType$2([new $Int(opts.Height)])); /* */ $s = 11; case 11: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
|
|
191858
|
+
_arg$3 = new $String(_r$5);
|
|
191859
|
+
$r = $clone(style, js.Value).Set("height", _arg$3); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191860
|
+
/* } */ case 4:
|
|
191861
|
+
_r$6 = webgl.FromCanvas($clone(canvasEl, js.Value)); /* */ $s = 13; case 13: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; }
|
|
191862
|
+
_tuple = _r$6;
|
|
191735
191863
|
gl = _tuple[0];
|
|
191736
191864
|
err = _tuple[1];
|
|
191737
191865
|
if (!($interfaceIsEqual(err, $ifaceNil))) {
|
|
191738
191866
|
$panic(err);
|
|
191739
191867
|
}
|
|
191740
191868
|
domEvents = dom.NewDomEvents();
|
|
191741
|
-
w = new windowImpl.ptr(screen$1, ptrType$
|
|
191742
|
-
/* */ if (!((opts.Width === 0))) { $s =
|
|
191743
|
-
/* */ $s =
|
|
191744
|
-
/* if (!((opts.Width === 0))) { */ case
|
|
191745
|
-
$r = dom.SetWindowWidth(opts.Width); /* */ $s =
|
|
191746
|
-
/* } */ case
|
|
191747
|
-
/* */ if (!((opts.Height === 0))) { $s =
|
|
191748
|
-
/* */ $s =
|
|
191749
|
-
/* if (!((opts.Height === 0))) { */ case
|
|
191750
|
-
$r = dom.SetWindowHeight(opts.Height); /* */ $s =
|
|
191751
|
-
/* } */ case
|
|
191752
|
-
/* */ if (!(opts.Title === "")) { $s =
|
|
191753
|
-
/* */ $s =
|
|
191754
|
-
/* if (!(opts.Title === "")) { */ case
|
|
191755
|
-
_r$
|
|
191756
|
-
_r$
|
|
191757
|
-
$r = $clone(_r$
|
|
191758
|
-
/* } */ case
|
|
191759
|
-
_r$
|
|
191760
|
-
w.vertexArray = _r$
|
|
191761
|
-
$r = domEvents.BindEvents(); /* */ $s =
|
|
191869
|
+
w = new windowImpl.ptr(screen$1, ptrType$2.nil, $clone(canvasEl, js.Value), gl, ptrType$4.nil, ptrType$5.nil, ptrType$4.nil, ptrType$5.nil, ptrType$5.nil, ptrType$5.nil, ptrType$6.nil, false, domEvents, 0, 0);
|
|
191870
|
+
/* */ if (!((opts.Width === 0))) { $s = 14; continue; }
|
|
191871
|
+
/* */ $s = 15; continue;
|
|
191872
|
+
/* if (!((opts.Width === 0))) { */ case 14:
|
|
191873
|
+
$r = dom.SetWindowWidth(opts.Width); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191874
|
+
/* } */ case 15:
|
|
191875
|
+
/* */ if (!((opts.Height === 0))) { $s = 17; continue; }
|
|
191876
|
+
/* */ $s = 18; continue;
|
|
191877
|
+
/* if (!((opts.Height === 0))) { */ case 17:
|
|
191878
|
+
$r = dom.SetWindowHeight(opts.Height); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191879
|
+
/* } */ case 18:
|
|
191880
|
+
/* */ if (!(opts.Title === "")) { $s = 20; continue; }
|
|
191881
|
+
/* */ $s = 21; continue;
|
|
191882
|
+
/* if (!(opts.Title === "")) { */ case 20:
|
|
191883
|
+
_r$7 = $clone($clone(screen$1.doc, js.Value).Get("head"), js.Value).Call("getElementsByTagName", new sliceType$2([new $String("title")])); /* */ $s = 22; case 22: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; }
|
|
191884
|
+
_r$8 = $clone(_r$7, js.Value).Call("item", new sliceType$2([new $Int(0)])); /* */ $s = 23; case 23: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; }
|
|
191885
|
+
$r = $clone(_r$8, js.Value).Set("innerHTML", new $String(opts.Title)); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191886
|
+
/* } */ case 21:
|
|
191887
|
+
_r$9 = w.createBuffers(); /* */ $s = 25; case 25: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; }
|
|
191888
|
+
w.vertexArray = _r$9;
|
|
191889
|
+
$r = domEvents.BindEvents(); /* */ $s = 26; case 26: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191762
191890
|
$s = -1; return w;
|
|
191763
|
-
/* */ } return; } var $f = {$blk: newWindow, $c: true, $r, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _tuple, canvasEl, domEvents, err, gl, opts, screen$1, w, $s};return $f;
|
|
191891
|
+
/* */ } return; } var $f = {$blk: newWindow, $c: true, $r, _arg, _arg$1, _arg$2, _arg$3, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, canvasEl, domEvents, err, gl, opts, screen$1, style, w, $s};return $f;
|
|
191764
191892
|
};
|
|
191765
191893
|
windowImpl.ptr.prototype.ensureCanvasSize = function(width, height) {
|
|
191766
191894
|
var height, w, width;
|
|
@@ -191859,9 +191987,9 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
|
|
|
191859
191987
|
$s = -1; return;
|
|
191860
191988
|
}
|
|
191861
191989
|
_ref = src;
|
|
191862
|
-
/* */ if ($assertType(_ref, ptrType$
|
|
191990
|
+
/* */ if ($assertType(_ref, ptrType$8, true)[1]) { $s = 1; continue; }
|
|
191863
191991
|
/* */ $s = 2; continue;
|
|
191864
|
-
/* if ($assertType(_ref, ptrType$
|
|
191992
|
+
/* if ($assertType(_ref, ptrType$8, true)[1]) { */ case 1:
|
|
191865
191993
|
jsSrc = _ref.$val;
|
|
191866
191994
|
_r = jsSrc.YCbCrJS(); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
191867
191995
|
/* */ if (_r.Use) { $s = 3; continue; }
|
|
@@ -192030,9 +192158,9 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
|
|
|
192030
192158
|
var {_q, _q$1, _q$2, _q$3, _r, _r$1, _r$2, _r$3, _tuple, err, height, w, width, $s, $r, $c} = $restore(this, {width, height});
|
|
192031
192159
|
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
192032
192160
|
w = this;
|
|
192033
|
-
/* */ if (w.programYUV420 === ptrType$
|
|
192161
|
+
/* */ if (w.programYUV420 === ptrType$4.nil) { $s = 1; continue; }
|
|
192034
192162
|
/* */ $s = 2; continue;
|
|
192035
|
-
/* if (w.programYUV420 === ptrType$
|
|
192163
|
+
/* if (w.programYUV420 === ptrType$4.nil) { */ case 1:
|
|
192036
192164
|
err = $ifaceNil;
|
|
192037
192165
|
_r = w.createAndLinkProgramYUV420(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
192038
192166
|
_tuple = _r;
|
|
@@ -192070,12 +192198,12 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
|
|
|
192070
192198
|
_r$1 = w.createAndAttachVertexShader(shaderProgram); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
192071
192199
|
err = _r$1;
|
|
192072
192200
|
if (!($interfaceIsEqual(err, $ifaceNil))) {
|
|
192073
|
-
$s = -1; return [ptrType$
|
|
192201
|
+
$s = -1; return [ptrType$4.nil, err];
|
|
192074
192202
|
}
|
|
192075
192203
|
_r$2 = w.createAndAttachFragmentShader(shaderProgram, "\nprecision mediump float;\nvarying vec2 v_texCoord;\nuniform sampler2D u_imageY;\nuniform sampler2D u_imageU;\nuniform sampler2D u_imageV;\n\nvoid main(void) {\n\tfloat yChannel = texture2D(u_imageY, v_texCoord).x;\n\tfloat uChannel = texture2D(u_imageU, v_texCoord).x;\n\tfloat vChannel = texture2D(u_imageV, v_texCoord).x;\n\n\t// This does the colorspace conversion from Y'UV to RGB as a matrix\n\t// multiply. It also does the offset of the U and V channels from\n\t// [0,1] to [-.5,.5] as part of the transform.\n\tvec4 channels = vec4(yChannel, uChannel, vChannel, 1.0);\n\n\tmat4 conversion = mat4(1.0, 0.0, 1.402, -0.701,\n\t\t\t\t\t\t\t1.0, -0.344, -0.714, 0.529,\n\t\t\t\t\t\t\t1.0, 1.772, 0.0, -0.886,\n\t\t\t\t\t\t\t0, 0, 0, 0);\n\tvec3 rgb = (channels * conversion).xyz;\n\n\t// This is another Y'UV transform that can be used, but it doesn't\n\t// accurately transform my source image. Your images may well fare\n\t// better with it, however, considering they come from a different\n\t// source, and because I'm not sure that my original was converted\n\t// to Y'UV420p with the same RGB->YUV (or YCrCb) conversion as\n\t// yours.\n\t//\n\t// vec4 channels = vec4(yChannel, uChannel, vChannel, 1.0);\n\t// float3x4 conversion = float3x4(1.0, 0.0, 1.13983, -0.569915,\n\t// 1.0, -0.39465, -0.58060, 0.487625,\n\t// 1.0, 2.03211, 0.0, -1.016055);\n\t// float3 rgb = mul(conversion, channels);\n\tgl_FragColor = vec4(rgb, 1.0);\n}\n"); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
192076
192204
|
err = _r$2;
|
|
192077
192205
|
if (!($interfaceIsEqual(err, $ifaceNil))) {
|
|
192078
|
-
$s = -1; return [ptrType$
|
|
192206
|
+
$s = -1; return [ptrType$4.nil, err];
|
|
192079
192207
|
}
|
|
192080
192208
|
$r = w.gl.LinkProgram(shaderProgram); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
192081
192209
|
_r$3 = w.gl.GetProgramParameterLinkStatus(shaderProgram); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
@@ -192085,7 +192213,7 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
|
|
|
192085
192213
|
_r$4 = w.gl.GetProgramInfoLog(shaderProgram); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
|
|
192086
192214
|
_arg = new $String(_r$4);
|
|
192087
192215
|
_r$5 = fmt.Errorf("Program: %s", new sliceType$2([_arg])); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
|
|
192088
|
-
$24r = [ptrType$
|
|
192216
|
+
$24r = [ptrType$4.nil, _r$5];
|
|
192089
192217
|
$s = 10; case 10: return $24r;
|
|
192090
192218
|
/* } */ case 6:
|
|
192091
192219
|
$r = w.gl.UseProgram(shaderProgram); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
@@ -192144,9 +192272,9 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
|
|
|
192144
192272
|
var {_r, _r$1, _tuple, err, height, w, width, $s, $r, $c} = $restore(this, {width, height});
|
|
192145
192273
|
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
192146
192274
|
w = this;
|
|
192147
|
-
/* */ if (w.programRGBA === ptrType$
|
|
192275
|
+
/* */ if (w.programRGBA === ptrType$4.nil) { $s = 1; continue; }
|
|
192148
192276
|
/* */ $s = 2; continue;
|
|
192149
|
-
/* if (w.programRGBA === ptrType$
|
|
192277
|
+
/* if (w.programRGBA === ptrType$4.nil) { */ case 1:
|
|
192150
192278
|
err = $ifaceNil;
|
|
192151
192279
|
_r = w.createAndLinkProgramRGBA(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
192152
192280
|
_tuple = _r;
|
|
@@ -192180,12 +192308,12 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
|
|
|
192180
192308
|
_r$1 = w.createAndAttachVertexShader(shaderProgram); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
192181
192309
|
err = _r$1;
|
|
192182
192310
|
if (!($interfaceIsEqual(err, $ifaceNil))) {
|
|
192183
|
-
$s = -1; return [ptrType$
|
|
192311
|
+
$s = -1; return [ptrType$4.nil, err];
|
|
192184
192312
|
}
|
|
192185
192313
|
_r$2 = w.createAndAttachFragmentShader(shaderProgram, "\nprecision mediump float;\nvarying vec2 v_texCoord;\nuniform sampler2D u_image;\n\nvoid main(void) {\n\tgl_FragColor = texture2D(u_image, v_texCoord);\n}\n"); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
192186
192314
|
err = _r$2;
|
|
192187
192315
|
if (!($interfaceIsEqual(err, $ifaceNil))) {
|
|
192188
|
-
$s = -1; return [ptrType$
|
|
192316
|
+
$s = -1; return [ptrType$4.nil, err];
|
|
192189
192317
|
}
|
|
192190
192318
|
$r = w.gl.LinkProgram(shaderProgram); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
192191
192319
|
_r$3 = w.gl.GetProgramParameterLinkStatus(shaderProgram); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
@@ -192195,7 +192323,7 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
|
|
|
192195
192323
|
_r$4 = w.gl.GetProgramInfoLog(shaderProgram); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
|
|
192196
192324
|
_arg = new $String(_r$4);
|
|
192197
192325
|
_r$5 = fmt.Errorf("Program: %s", new sliceType$2([_arg])); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
|
|
192198
|
-
$24r = [ptrType$
|
|
192326
|
+
$24r = [ptrType$4.nil, _r$5];
|
|
192199
192327
|
$s = 10; case 10: return $24r;
|
|
192200
192328
|
/* } */ case 6:
|
|
192201
192329
|
$r = w.gl.UseProgram(shaderProgram); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
@@ -192306,7 +192434,7 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
|
|
|
192306
192434
|
newBuffer = function(screen$1, size) {
|
|
192307
192435
|
var _q, _q$1, _q$2, b, rect, screen$1, size;
|
|
192308
192436
|
rect = new image.Rectangle.ptr(new image.Point.ptr(0, 0), $clone(size, image.Point));
|
|
192309
|
-
b = new BufferImpl.ptr(screen$1, $clone(size, image.Point), new sync.Mutex.ptr(0, 0), false, $clone(new image.RGBA.ptr($makeSlice(sliceType$3, ($imul(($imul(4, size.X)), size.Y))), $imul(4, size.X), $clone(rect, image.Rectangle)), image.RGBA), $clone(new image.YCbCr.ptr($makeSlice(sliceType$3, ($imul(size.X, size.Y))), $makeSlice(sliceType$3, (_q$1 = ($imul(size.X, size.Y)) / 4, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero"))), $makeSlice(sliceType$3, (_q$2 = ($imul(size.X, size.Y)) / 4, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero"))), size.X, (_q = size.X / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")), 2, $clone(rect, image.Rectangle)), image.YCbCr), ptrType$
|
|
192437
|
+
b = new BufferImpl.ptr(screen$1, $clone(size, image.Point), new sync.Mutex.ptr(0, 0), false, $clone(new image.RGBA.ptr($makeSlice(sliceType$3, ($imul(($imul(4, size.X)), size.Y))), $imul(4, size.X), $clone(rect, image.Rectangle)), image.RGBA), $clone(new image.YCbCr.ptr($makeSlice(sliceType$3, ($imul(size.X, size.Y))), $makeSlice(sliceType$3, (_q$1 = ($imul(size.X, size.Y)) / 4, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero"))), $makeSlice(sliceType$3, (_q$2 = ($imul(size.X, size.Y)) / 4, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero"))), size.X, (_q = size.X / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")), 2, $clone(rect, image.Rectangle)), image.YCbCr), ptrType$9.nil);
|
|
192310
192438
|
return b;
|
|
192311
192439
|
};
|
|
192312
192440
|
BufferImpl.ptr.prototype.Size = function() {
|
|
@@ -192337,9 +192465,9 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
|
|
|
192337
192465
|
var {_r, b, emptyBuffer, $s, $r, $c} = $restore(this, {});
|
|
192338
192466
|
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
192339
192467
|
b = this;
|
|
192340
|
-
/* */ if (b.ycbcrJS === ptrType$
|
|
192468
|
+
/* */ if (b.ycbcrJS === ptrType$9.nil) { $s = 1; continue; }
|
|
192341
192469
|
/* */ $s = 2; continue;
|
|
192342
|
-
/* if (b.ycbcrJS === ptrType$
|
|
192470
|
+
/* if (b.ycbcrJS === ptrType$9.nil) { */ case 1:
|
|
192343
192471
|
_r = $clone($clone(js.Global(), js.Value).Get("ArrayBuffer"), js.Value).New(sliceType$2.nil); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
192344
192472
|
emptyBuffer = $clone(_r, js.Value);
|
|
192345
192473
|
b.ycbcrJS = new YCbCrJS.ptr($clone(new ArrayBufferSlice.ptr($clone(emptyBuffer, js.Value), 0, 0), ArrayBufferSlice), $clone(new ArrayBufferSlice.ptr($clone(emptyBuffer, js.Value), 0, 0), ArrayBufferSlice), $clone(new ArrayBufferSlice.ptr($clone(emptyBuffer, js.Value), 0, 0), ArrayBufferSlice), b.ycbcr.YStride, b.ycbcr.CStride, 2, $clone(b.ycbcr.Rect, image.Rectangle), false);
|
|
@@ -192364,15 +192492,15 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
|
|
|
192364
192492
|
/* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: BufferImpl.ptr.prototype.Release, $c: true, $r, b, $s, $deferred};return $f; } }
|
|
192365
192493
|
};
|
|
192366
192494
|
BufferImpl.prototype.Release = function() { return this.$val.Release(); };
|
|
192367
|
-
ptrType$
|
|
192368
|
-
ptrType.methods = [{prop: "NewBuffer", name: "NewBuffer", pkg: "", typ: $funcType([image.Point], [screen.Buffer, $error], false)}, {prop: "NewTexture", name: "NewTexture", pkg: "", typ: $funcType([image.Point], [screen.Texture, $error], false)}, {prop: "NewWindow", name: "NewWindow", pkg: "", typ: $funcType([ptrType
|
|
192495
|
+
ptrType$11.methods = [{prop: "ensureCanvasSize", name: "ensureCanvasSize", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([$Int, $Int], [], false)}, {prop: "clear", name: "clear", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([], [], false)}, {prop: "Release", name: "Release", pkg: "", typ: $funcType([], [], false)}, {prop: "Publish", name: "Publish", pkg: "", typ: $funcType([], [screen.PublishResult], false)}, {prop: "Send", name: "Send", pkg: "", typ: $funcType([$emptyInterface], [], false)}, {prop: "SendFirst", name: "SendFirst", pkg: "", typ: $funcType([$emptyInterface], [], false)}, {prop: "NextEvent", name: "NextEvent", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "Upload", name: "Upload", pkg: "", typ: $funcType([image.Point, screen.Buffer, image.Rectangle], [], false)}, {prop: "UploadYCbCr", name: "UploadYCbCr", pkg: "", typ: $funcType([image.Point, screen.Buffer, image.Rectangle], [], false)}, {prop: "Fill", name: "Fill", pkg: "", typ: $funcType([image.Rectangle, color.Color, draw.Op], [], false)}, {prop: "Draw", name: "Draw", pkg: "", typ: $funcType([f64.Aff3, screen.Texture, image.Rectangle, draw.Op, ptrType$10], [], false)}, {prop: "DrawUniform", name: "DrawUniform", pkg: "", typ: $funcType([f64.Aff3, color.Color, image.Rectangle, draw.Op, ptrType$10], [], false)}, {prop: "Copy", name: "Copy", pkg: "", typ: $funcType([image.Point, screen.Texture, image.Rectangle, draw.Op, ptrType$10], [], false)}, {prop: "Scale", name: "Scale", pkg: "", typ: $funcType([image.Rectangle, screen.Texture, image.Rectangle, draw.Op, ptrType$10], [], false)}, {prop: "createAndAttachVertexShader", name: "createAndAttachVertexShader", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([ptrType$4], [$error], false)}, {prop: "ensureYUV420Textures", name: "ensureYUV420Textures", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([$Int, $Int], [], false)}, {prop: "createAndLinkProgramYUV420", name: "createAndLinkProgramYUV420", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([], [ptrType$4, $error], false)}, {prop: "drawBufferYUV420", name: "drawBufferYUV420", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([image.Point, screen.Buffer, image.Rectangle], [], false)}, {prop: "drawBufferYUV420JSArrayBuffers", name: "drawBufferYUV420JSArrayBuffers", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([image.Point, js.Value, js.Value, js.Value, image.Rectangle], [], false)}, {prop: "ensureRGBATextures", name: "ensureRGBATextures", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([$Int, $Int], [], false)}, {prop: "createAndLinkProgramRGBA", name: "createAndLinkProgramRGBA", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([], [ptrType$4, $error], false)}, {prop: "drawBufferRGBA", name: "drawBufferRGBA", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([image.Point, screen.Buffer, image.Rectangle], [], false)}, {prop: "createBuffers", name: "createBuffers", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([], [ptrType$6], false)}, {prop: "createAndAttachFragmentShader", name: "createAndAttachFragmentShader", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([ptrType$4, $String], [$error], false)}, {prop: "createTexture", name: "createTexture", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([types.GLEnum, types.GLEnum, $Int, $Int], [ptrType$5], false)}];
|
|
192496
|
+
ptrType$1.methods = [{prop: "NewBuffer", name: "NewBuffer", pkg: "", typ: $funcType([image.Point], [screen.Buffer, $error], false)}, {prop: "NewTexture", name: "NewTexture", pkg: "", typ: $funcType([image.Point], [screen.Texture, $error], false)}, {prop: "NewWindow", name: "NewWindow", pkg: "", typ: $funcType([ptrType], [screen.Window, $error], false)}];
|
|
192369
192497
|
ptrType$12.methods = [{prop: "slice", name: "slice", pkg: "golang.org/x/exp/shiny/driver/webgldriver", typ: $funcType([], [js.Value], false)}];
|
|
192370
|
-
ptrType$
|
|
192371
|
-
windowImpl.init("golang.org/x/exp/shiny/driver/webgldriver", [{prop: "screen", name: "screen", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "mutex", name: "mutex", embedded: false, exported: false, typ: ptrType$
|
|
192498
|
+
ptrType$8.methods = [{prop: "Size", name: "Size", pkg: "", typ: $funcType([], [image.Point], false)}, {prop: "Bounds", name: "Bounds", pkg: "", typ: $funcType([], [image.Rectangle], false)}, {prop: "RGBA", name: "RGBA", pkg: "", typ: $funcType([], [ptrType$13], false)}, {prop: "YCbCr", name: "YCbCr", pkg: "", typ: $funcType([], [ptrType$14], false)}, {prop: "YCbCrJS", name: "YCbCrJS", pkg: "", typ: $funcType([], [ptrType$9], false)}, {prop: "Release", name: "Release", pkg: "", typ: $funcType([], [], false)}];
|
|
192499
|
+
windowImpl.init("golang.org/x/exp/shiny/driver/webgldriver", [{prop: "screen", name: "screen", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "mutex", name: "mutex", embedded: false, exported: false, typ: ptrType$2, tag: ""}, {prop: "canvasEl", name: "canvasEl", embedded: false, exported: false, typ: js.Value, tag: ""}, {prop: "gl", name: "gl", embedded: false, exported: false, typ: ptrType$3, tag: ""}, {prop: "programRGBA", name: "programRGBA", embedded: false, exported: false, typ: ptrType$4, tag: ""}, {prop: "imageTexRGBA", name: "imageTexRGBA", embedded: false, exported: false, typ: ptrType$5, tag: ""}, {prop: "programYUV420", name: "programYUV420", embedded: false, exported: false, typ: ptrType$4, tag: ""}, {prop: "imageTexY", name: "imageTexY", embedded: false, exported: false, typ: ptrType$5, tag: ""}, {prop: "imageTexU", name: "imageTexU", embedded: false, exported: false, typ: ptrType$5, tag: ""}, {prop: "imageTexV", name: "imageTexV", embedded: false, exported: false, typ: ptrType$5, tag: ""}, {prop: "vertexArray", name: "vertexArray", embedded: false, exported: false, typ: ptrType$6, tag: ""}, {prop: "released", name: "released", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "domEvents", name: "domEvents", embedded: false, exported: false, typ: ptrType$7, tag: ""}, {prop: "width", name: "width", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "height", name: "height", embedded: false, exported: false, typ: $Int, tag: ""}]);
|
|
192372
192500
|
screenImpl.init("golang.org/x/exp/shiny/driver/webgldriver", [{prop: "doc", name: "doc", embedded: false, exported: false, typ: js.Value, tag: ""}]);
|
|
192373
192501
|
ArrayBufferSlice.init("", [{prop: "ArrayBuffer", name: "ArrayBuffer", embedded: false, exported: true, typ: js.Value, tag: ""}, {prop: "Offset", name: "Offset", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Length", name: "Length", embedded: false, exported: true, typ: $Int, tag: ""}]);
|
|
192374
192502
|
YCbCrJS.init("", [{prop: "Y", name: "Y", embedded: false, exported: true, typ: ArrayBufferSlice, tag: ""}, {prop: "Cb", name: "Cb", embedded: false, exported: true, typ: ArrayBufferSlice, tag: ""}, {prop: "Cr", name: "Cr", embedded: false, exported: true, typ: ArrayBufferSlice, tag: ""}, {prop: "YStride", name: "YStride", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "CStride", name: "CStride", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "SubsampleRatio", name: "SubsampleRatio", embedded: false, exported: true, typ: image.YCbCrSubsampleRatio, tag: ""}, {prop: "Rect", name: "Rect", embedded: false, exported: true, typ: image.Rectangle, tag: ""}, {prop: "Use", name: "Use", embedded: false, exported: true, typ: $Bool, tag: ""}]);
|
|
192375
|
-
BufferImpl.init("golang.org/x/exp/shiny/driver/webgldriver", [{prop: "screen", name: "screen", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "size", name: "size", embedded: false, exported: false, typ: image.Point, tag: ""}, {prop: "mutex", name: "mutex", embedded: false, exported: false, typ: ptrType$
|
|
192503
|
+
BufferImpl.init("golang.org/x/exp/shiny/driver/webgldriver", [{prop: "screen", name: "screen", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "size", name: "size", embedded: false, exported: false, typ: image.Point, tag: ""}, {prop: "mutex", name: "mutex", embedded: false, exported: false, typ: ptrType$2, tag: ""}, {prop: "released", name: "released", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "rgba", name: "rgba", embedded: false, exported: false, typ: image.RGBA, tag: ""}, {prop: "ycbcr", name: "ycbcr", embedded: false, exported: false, typ: image.YCbCr, tag: ""}, {prop: "ycbcrJS", name: "ycbcrJS", embedded: false, exported: false, typ: ptrType$9, tag: ""}]);
|
|
192376
192504
|
$init = function() {
|
|
192377
192505
|
$pkg.$init = function() {};
|
|
192378
192506
|
/* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
@@ -192474,7 +192602,7 @@ $packages["github.com/supraio/client-daemon/pkg/decoder/sosstream"] = (function(
|
|
|
192474
192602
|
};
|
|
192475
192603
|
SOSVideoStreamer.prototype.IsAvailable = function() { return this.$val.IsAvailable(); };
|
|
192476
192604
|
SOSVideoStreamer.ptr.prototype.Play = function() {
|
|
192477
|
-
var {$24r, $24r$1, _arg, _arg$1, _r, _r$1, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, err, height, hostname, m, options, playStream, port, preparePromise, protocol, sosProtocol, url, urlProtocol, width, $s, $r, $c} = $restore(this, {});
|
|
192605
|
+
var {$24r, $24r$1, _arg, _arg$1, _r, _r$1, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tuple, _tuple$1, err, geometry, height, hostname, m, options, playStream, port, preparePromise, protocol, sosProtocol, url, urlProtocol, width, x, y, $s, $r, $c} = $restore(this, {});
|
|
192478
192606
|
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
192479
192607
|
m = this;
|
|
192480
192608
|
/* */ if (!m.started) { $s = 1; continue; }
|
|
@@ -192487,14 +192615,25 @@ $packages["github.com/supraio/client-daemon/pkg/decoder/sosstream"] = (function(
|
|
|
192487
192615
|
sosProtocol = m.getSOSProtocol(protocol);
|
|
192488
192616
|
_r = fmt.Sprintf("%s://%s:%d", new sliceType([new $String(urlProtocol), new $String(hostname), new $Uint16(port)])); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
192489
192617
|
url = _r;
|
|
192618
|
+
_tmp = 0;
|
|
192619
|
+
_tmp$1 = 0;
|
|
192620
|
+
x = _tmp;
|
|
192621
|
+
y = _tmp$1;
|
|
192490
192622
|
width = $clone($clone($clone(js.Global(), js.Value).Get("screen"), js.Value).Get("width"), js.Value).Int();
|
|
192491
192623
|
height = $clone($clone($clone(js.Global(), js.Value).Get("screen"), js.Value).Get("height"), js.Value).Int();
|
|
192624
|
+
geometry = $clone($clone($clone(js.Global(), js.Value).Get("__supra"), js.Value).Get("geometry"), js.Value);
|
|
192625
|
+
if (!$clone(geometry, js.Value).IsUndefined() && !$clone(geometry, js.Value).IsNull()) {
|
|
192626
|
+
x = $clone($clone(geometry, js.Value).Get("x"), js.Value).Int();
|
|
192627
|
+
y = $clone($clone(geometry, js.Value).Get("y"), js.Value).Int();
|
|
192628
|
+
width = $clone($clone(geometry, js.Value).Get("width"), js.Value).Int();
|
|
192629
|
+
height = $clone($clone(geometry, js.Value).Get("height"), js.Value).Int();
|
|
192630
|
+
}
|
|
192492
192631
|
_r$1 = $clone($clone(js.Global(), js.Value).Get("Object"), js.Value).New(sliceType.nil); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
192493
192632
|
options = $clone(_r$1, js.Value);
|
|
192494
192633
|
$clone(options, js.Value).Set("background", new $Bool(true));
|
|
192495
192634
|
$clone(options, js.Value).Set("protocol", new $String(sosProtocol));
|
|
192496
192635
|
$clone(options, js.Value).Set("lowLatency", new $Bool(true));
|
|
192497
|
-
_r$2 = $clone($clone(m.sos, js.Value).Get("stream"), js.Value).Call("prepare", new sliceType([new $String(url), new $Int(
|
|
192636
|
+
_r$2 = $clone($clone(m.sos, js.Value).Get("stream"), js.Value).Call("prepare", new sliceType([new $String(url), new $Int(x), new $Int(y), new $Int(width), new $Int(height), new options.constructor.elem(options)])); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
192498
192637
|
preparePromise = $clone(_r$2, js.Value);
|
|
192499
192638
|
_r$3 = jshelper.Await($clone(preparePromise, js.Value)); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
192500
192639
|
_tuple = _r$3;
|
|
@@ -192509,7 +192648,7 @@ $packages["github.com/supraio/client-daemon/pkg/decoder/sosstream"] = (function(
|
|
|
192509
192648
|
$24r = _r$6;
|
|
192510
192649
|
$s = 12; case 12: return $24r;
|
|
192511
192650
|
/* } */ case 8:
|
|
192512
|
-
_r$7 = $clone($clone(m.sos, js.Value).Get("stream"), js.Value).Call("play", new sliceType([new $String(url), new $Int(
|
|
192651
|
+
_r$7 = $clone($clone(m.sos, js.Value).Get("stream"), js.Value).Call("play", new sliceType([new $String(url), new $Int(x), new $Int(y), new $Int(width), new $Int(height), new options.constructor.elem(options)])); /* */ $s = 13; case 13: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; }
|
|
192513
192652
|
playStream = $clone(_r$7, js.Value);
|
|
192514
192653
|
_r$8 = jshelper.Await($clone(playStream, js.Value)); /* */ $s = 14; case 14: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; }
|
|
192515
192654
|
_tuple$1 = _r$8;
|
|
@@ -192527,7 +192666,7 @@ $packages["github.com/supraio/client-daemon/pkg/decoder/sosstream"] = (function(
|
|
|
192527
192666
|
m.started = true;
|
|
192528
192667
|
/* } */ case 2:
|
|
192529
192668
|
$s = -1; return $ifaceNil;
|
|
192530
|
-
/* */ } return; } var $f = {$blk: SOSVideoStreamer.ptr.prototype.Play, $c: true, $r, $24r, $24r$1, _arg, _arg$1, _r, _r$1, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, err, height, hostname, m, options, playStream, port, preparePromise, protocol, sosProtocol, url, urlProtocol, width, $s};return $f;
|
|
192669
|
+
/* */ } return; } var $f = {$blk: SOSVideoStreamer.ptr.prototype.Play, $c: true, $r, $24r, $24r$1, _arg, _arg$1, _r, _r$1, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tuple, _tuple$1, err, geometry, height, hostname, m, options, playStream, port, preparePromise, protocol, sosProtocol, url, urlProtocol, width, x, y, $s};return $f;
|
|
192531
192670
|
};
|
|
192532
192671
|
SOSVideoStreamer.prototype.Play = function() { return this.$val.Play(); };
|
|
192533
192672
|
SOSVideoStreamer.ptr.prototype.Stop = function() {
|
|
@@ -193133,7 +193272,7 @@ $packages["golang.org/x/mobile/event/lifecycle"] = (function() {
|
|
|
193133
193272
|
return $pkg;
|
|
193134
193273
|
})();
|
|
193135
193274
|
$packages["github.com/supraio/client-daemon/pkg/render"] = (function() {
|
|
193136
|
-
var $pkg = {}, $init, binary, json, query, clientscreen, clipboard, nacldecoder, nacldriver, samsungwasmdecoder, webcodecs, errs, helper, input, message, netclient, netpacket, netstream, netframe, jswebsocketworker, player, overlaydriver, stats, videostream, window, canvasdriver, webgldriver, screen, focus, key, lifecycle, mouse, size, touch, geom, image, io, ioutil, log, os, path, strings, sync, js, time, screenParams, ScreenManager, ProcessInfo, ProcessInfoManager, sliceType, ptrType, funcType, sliceType$2, sliceType$4, arrayType, mapType, ptrType$
|
|
193275
|
+
var $pkg = {}, $init, binary, json, query, clientscreen, clipboard, nacldecoder, nacldriver, samsungwasmdecoder, webcodecs, errs, helper, input, message, netclient, netpacket, netstream, netframe, jswebsocketworker, player, overlaydriver, stats, videostream, window, canvasdriver, webgldriver, screen, focus, key, lifecycle, mouse, size, touch, geom, image, io, ioutil, log, os, path, strings, sync, js, time, Geometry, screenParams, ScreenManager, ProcessInfo, ProcessInfoManager, sliceType, ptrType, funcType, ptrType$14, sliceType$2, sliceType$4, arrayType, mapType, ptrType$16, onScreenWindowStarted, openScreenWindows, mutex, NewScreenManager, NewProcessInfoManager, init, registerJSBridge, geometryValue;
|
|
193137
193276
|
binary = $packages["encoding/binary"];
|
|
193138
193277
|
json = $packages["encoding/json"];
|
|
193139
193278
|
query = $packages["github.com/google/go-querystring/query"];
|
|
@@ -193177,6 +193316,20 @@ $packages["github.com/supraio/client-daemon/pkg/render"] = (function() {
|
|
|
193177
193316
|
sync = $packages["sync"];
|
|
193178
193317
|
js = $packages["syscall/js"];
|
|
193179
193318
|
time = $packages["time"];
|
|
193319
|
+
Geometry = $pkg.Geometry = $newType(0, $kindStruct, "render.Geometry", true, "github.com/supraio/client-daemon/pkg/render", true, function(X_, Y_, Width_, Height_) {
|
|
193320
|
+
this.$val = this;
|
|
193321
|
+
if (arguments.length === 0) {
|
|
193322
|
+
this.X = 0;
|
|
193323
|
+
this.Y = 0;
|
|
193324
|
+
this.Width = 0;
|
|
193325
|
+
this.Height = 0;
|
|
193326
|
+
return;
|
|
193327
|
+
}
|
|
193328
|
+
this.X = X_;
|
|
193329
|
+
this.Y = Y_;
|
|
193330
|
+
this.Width = Width_;
|
|
193331
|
+
this.Height = Height_;
|
|
193332
|
+
});
|
|
193180
193333
|
screenParams = $pkg.screenParams = $newType(0, $kindStruct, "render.screenParams", true, "github.com/supraio/client-daemon/pkg/render", false, function(ScreenID_, ScreenDriver_, ScreenHost_, MetadataDriver_, MetadataHost_, ClientID_, ClientSecret_, Secure_) {
|
|
193181
193334
|
this.$val = this;
|
|
193182
193335
|
if (arguments.length === 0) {
|
|
@@ -193234,11 +193387,12 @@ $packages["github.com/supraio/client-daemon/pkg/render"] = (function() {
|
|
|
193234
193387
|
sliceType = $sliceType($Uint8);
|
|
193235
193388
|
ptrType = $ptrType(ProcessInfoManager);
|
|
193236
193389
|
funcType = $funcType([], [], false);
|
|
193390
|
+
ptrType$14 = $ptrType(Geometry);
|
|
193237
193391
|
sliceType$2 = $sliceType($emptyInterface);
|
|
193238
193392
|
sliceType$4 = $sliceType($String);
|
|
193239
193393
|
arrayType = $arrayType(funcType, 0);
|
|
193240
193394
|
mapType = $mapType($String, $emptyInterface);
|
|
193241
|
-
ptrType$
|
|
193395
|
+
ptrType$16 = $ptrType(ScreenManager);
|
|
193242
193396
|
ScreenManager.ptr.prototype.StartScreen = function(screenID, screenDriver, screenHost, metadataDriver, metadataHost, clientID, clientSecret, secure) {
|
|
193243
193397
|
var {$24r, $24r$1, $24r$2, _key, _r, _r$1, _tuple, baseUrl, clientID, clientSecret, err, height, killScreen, left, m, metadataDriver, metadataHost, params, screenDriver, screenHost, screenID, screenWindow, secure, top, width, windowOpts, $s, $deferred, $r, $c} = $restore(this, {screenID, screenDriver, screenHost, metadataDriver, metadataHost, clientID, clientSecret, secure});
|
|
193244
193398
|
/* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred);
|
|
@@ -193588,10 +193742,10 @@ $packages["github.com/supraio/client-daemon/pkg/render"] = (function() {
|
|
|
193588
193742
|
onScreenWindowStarted = registerJSBridge;
|
|
193589
193743
|
};
|
|
193590
193744
|
registerJSBridge = function(w) {
|
|
193591
|
-
var {supraObj, w, x, x$1, x$2, $s, $r, $c} = $restore(this, {w});
|
|
193745
|
+
var {supraObj, w, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {w});
|
|
193592
193746
|
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
193593
193747
|
w = [w];
|
|
193594
|
-
supraObj = $makeMap($String.keyFor, [{ k: "setEncodingPreferences", v: (x = js.FuncOf((function(w) { return function $b(this$1, args) {
|
|
193748
|
+
supraObj = $makeMap($String.keyFor, [{ k: "geometry", v: geometryValue(w[0].Geometry()) }, { k: "screenStopped", v: new $Bool(false) }, { k: "setEncodingPreferences", v: (x = js.FuncOf((function(w) { return function $b(this$1, args) {
|
|
193595
193749
|
var {_r, args, err, jsonStr, prefs, this$1, $s, $r, $c} = $restore(this, {this$1, args});
|
|
193596
193750
|
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
193597
193751
|
prefs = [prefs];
|
|
@@ -193631,14 +193785,30 @@ $packages["github.com/supraio/client-daemon/pkg/render"] = (function() {
|
|
|
193631
193785
|
/* } */ case 3:
|
|
193632
193786
|
$s = -1; return new $String(($bytesToString(data)));
|
|
193633
193787
|
/* */ } return; } var $f = {$blk: $b, $c: true, $r, _r, _tuple, args, clientStats, data, err, this$1, $s};return $f;
|
|
193634
|
-
}; })(w)), new x$1.constructor.elem(x$1)) }
|
|
193635
|
-
|
|
193788
|
+
}; })(w)), new x$1.constructor.elem(x$1)) }, { k: "stopScreen", v: (x$2 = js.FuncOf((function(w) { return function $b(this$1, args) {
|
|
193789
|
+
var {args, this$1, $s, $r, $c} = $restore(this, {this$1, args});
|
|
193790
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
193791
|
+
$r = log.Println(new sliceType$2([new $String("__supra.stopScreen: stopping screen rendering")])); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
193792
|
+
$clone($clone(js.Global(), js.Value).Get("__supra"), js.Value).Set("screenStopped", new $Bool(true));
|
|
193793
|
+
$go($methodVal(w[0], "Close"), []);
|
|
193794
|
+
$s = -1; return $ifaceNil;
|
|
193795
|
+
/* */ } return; } var $f = {$blk: $b, $c: true, $r, args, this$1, $s};return $f;
|
|
193796
|
+
}; })(w)), new x$2.constructor.elem(x$2)) }]);
|
|
193797
|
+
$clone(js.Global(), js.Value).Set("__supra", (x$3 = js.ValueOf(new mapType(supraObj)), new x$3.constructor.elem(x$3)));
|
|
193636
193798
|
$r = log.Println(new sliceType$2([new $String("Registered window.__supra JS bridge")])); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
193637
193799
|
$s = -1; return;
|
|
193638
|
-
/* */ } return; } var $f = {$blk: registerJSBridge, $c: true, $r, supraObj, w, x, x$1, x$2, $s};return $f;
|
|
193800
|
+
/* */ } return; } var $f = {$blk: registerJSBridge, $c: true, $r, supraObj, w, x, x$1, x$2, x$3, $s};return $f;
|
|
193801
|
+
};
|
|
193802
|
+
geometryValue = function(g) {
|
|
193803
|
+
var g;
|
|
193804
|
+
if (g === ptrType$14.nil) {
|
|
193805
|
+
return $ifaceNil;
|
|
193806
|
+
}
|
|
193807
|
+
return new mapType($makeMap($String.keyFor, [{ k: "x", v: new $Int(g.X) }, { k: "y", v: new $Int(g.Y) }, { k: "width", v: new $Int(g.Width) }, { k: "height", v: new $Int(g.Height) }]));
|
|
193639
193808
|
};
|
|
193640
|
-
ptrType$
|
|
193809
|
+
ptrType$16.methods = [{prop: "StartScreen", name: "StartScreen", pkg: "", typ: $funcType([$String, netpacket.Driver, $String, netstream.Driver, $String, $String, $String, $Bool], [$error], false)}, {prop: "openWindow", name: "openWindow", pkg: "github.com/supraio/client-daemon/pkg/render", typ: $funcType([$String, screenParams, sliceType$4], [js.Value, $error], false)}, {prop: "closeWindow", name: "closeWindow", pkg: "github.com/supraio/client-daemon/pkg/render", typ: $funcType([js.Value], [$error], false)}, {prop: "StopScreen", name: "StopScreen", pkg: "", typ: $funcType([$String], [$error], false)}, {prop: "pipeErrLog", name: "pipeErrLog", pkg: "github.com/supraio/client-daemon/pkg/render", typ: $funcType([$String, io.Reader], [$error], false)}, {prop: "ListScreens", name: "ListScreens", pkg: "", typ: $funcType([], [sliceType$4, $error], false)}];
|
|
193641
193810
|
ptrType.methods = [{prop: "CreateProcessInfo", name: "CreateProcessInfo", pkg: "", typ: $funcType([$String, $Int], [$error], false)}, {prop: "RemoveProcessInfo", name: "RemoveProcessInfo", pkg: "", typ: $funcType([$String], [$error], false)}, {prop: "WaitProcess", name: "WaitProcess", pkg: "", typ: $funcType([$String], [$error], false)}, {prop: "GetProcessInfo", name: "GetProcessInfo", pkg: "", typ: $funcType([$String], [ProcessInfo, $error], false)}, {prop: "ListScreenIDs", name: "ListScreenIDs", pkg: "", typ: $funcType([], [sliceType$4, $error], false)}, {prop: "getUserProcessDirPath", name: "getUserProcessDirPath", pkg: "github.com/supraio/client-daemon/pkg/render", typ: $funcType([], [$String], false)}];
|
|
193811
|
+
Geometry.init("", [{prop: "X", name: "X", embedded: false, exported: true, typ: $Int, tag: "json:\"x\""}, {prop: "Y", name: "Y", embedded: false, exported: true, typ: $Int, tag: "json:\"y\""}, {prop: "Width", name: "Width", embedded: false, exported: true, typ: $Int, tag: "json:\"width\""}, {prop: "Height", name: "Height", embedded: false, exported: true, typ: $Int, tag: "json:\"height\""}]);
|
|
193642
193812
|
screenParams.init("", [{prop: "ScreenID", name: "ScreenID", embedded: false, exported: true, typ: $String, tag: "url:\"screenID\""}, {prop: "ScreenDriver", name: "ScreenDriver", embedded: false, exported: true, typ: $String, tag: "url:\"screenDriver\""}, {prop: "ScreenHost", name: "ScreenHost", embedded: false, exported: true, typ: $String, tag: "url:\"screenHost\""}, {prop: "MetadataDriver", name: "MetadataDriver", embedded: false, exported: true, typ: $String, tag: "url:\"metadataDriver\""}, {prop: "MetadataHost", name: "MetadataHost", embedded: false, exported: true, typ: $String, tag: "url:\"metadataHost\""}, {prop: "ClientID", name: "ClientID", embedded: false, exported: true, typ: $String, tag: "url:\"clientID\""}, {prop: "ClientSecret", name: "ClientSecret", embedded: false, exported: true, typ: $String, tag: "url:\"clientSecret\""}, {prop: "Secure", name: "Secure", embedded: false, exported: true, typ: $Bool, tag: "url:\"secure\""}]);
|
|
193643
193813
|
ScreenManager.init("github.com/supraio/client-daemon/pkg/render", [{prop: "screenWindowCmd", name: "screenWindowCmd", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "logDir", name: "logDir", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "processInfoManager", name: "processInfoManager", embedded: false, exported: false, typ: ptrType, tag: ""}]);
|
|
193644
193814
|
ProcessInfo.init("", [{prop: "ScreenID", name: "ScreenID", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Pid", name: "Pid", embedded: false, exported: true, typ: $Int, tag: ""}]);
|