@@ -593,9 +593,7 @@ class XpraClient {
593593 this . clog ( "we can decode using a worker:" , decode_worker ) ;
594594 if ( this . decode_worker_timeout ) {
595595 this . clog ( "but worker initialization took too long!" ) ;
596- decode_worker . postMessage ( {
597- cmd : "close" ,
598- } ) ;
596+ decode_worker . postMessage ( { cmd : "close" } ) ;
599597 this . decode_worker = null ;
600598 }
601599 else {
@@ -620,10 +618,7 @@ class XpraClient {
620618 false
621619 ) ;
622620 this . clog ( "decode worker will check:" , this . check_encodings ) ;
623- decode_worker . postMessage ( {
624- cmd : "check" ,
625- encodings : this . check_encodings ,
626- } ) ;
621+ decode_worker . postMessage ( { cmd : "check" , encodings : this . check_encodings } ) ;
627622 }
628623
629624 open_protocol ( ) {
@@ -679,9 +674,7 @@ class XpraClient {
679674 win . destroy ( ) ;
680675 }
681676 if ( this . decode_worker ) {
682- this . decode_worker . postMessage ( {
683- cmd : "close" ,
684- } ) ;
677+ this . decode_worker . postMessage ( { cmd : "close" } ) ;
685678 this . decode_worker = null ;
686679 }
687680 }
@@ -3412,10 +3405,7 @@ class XpraClient {
34123405 this . auto_focus ( ) ;
34133406 }
34143407 if ( this . decode_worker ) {
3415- this . decode_worker . postMessage ( {
3416- cmd : "remove" ,
3417- wid
3418- } ) ;
3408+ this . decode_worker . postMessage ( { cmd : "remove" , wid} ) ;
34193409 }
34203410 }
34213411
@@ -3638,13 +3628,7 @@ class XpraClient {
36383628 raw_buffers . push ( img_data . buffer ) ;
36393629 }
36403630 if ( this . decode_worker ) {
3641- this . decode_worker . postMessage ( {
3642- cmd : "decode" ,
3643- packet,
3644- start : now
3645- } ,
3646- raw_buffers
3647- ) ;
3631+ this . decode_worker . postMessage ( { cmd : "decode" , packet, start : now } , raw_buffers ) ;
36483632 //the worker draw event will call do_process_draw
36493633 } else {
36503634 this . do_process_draw ( packet , now ) ;
@@ -3655,10 +3639,7 @@ class XpraClient {
36553639 this . do_process_draw ( packet , 0 ) ;
36563640 const wid = packet [ 1 ] ;
36573641 if ( this . decode_worker ) {
3658- this . decode_worker . postMessage ( {
3659- cmd : "eos" ,
3660- wid
3661- } ) ;
3642+ this . decode_worker . postMessage ( { cmd : "eos" , wid} ) ;
36623643 }
36633644 }
36643645
@@ -3669,10 +3650,7 @@ class XpraClient {
36693650 }
36703651
36713652 if ( this . offscreen_api && this . decode_worker ) {
3672- this . decode_worker . postMessage ( {
3673- cmd : "redraw" ,
3674- wid : win . wid
3675- } ) ;
3653+ this . decode_worker . postMessage ( { cmd : "redraw" , wid : win . wid } ) ;
36763654 return ;
36773655 }
36783656 // request that drawing to screen takes place at next available opportunity if possible
0 commit comments