KASM-3535 code to disable workers on jpeg quality change more qoi threads (#47)
Added more QOI worker threads
This commit is contained in:
parent
437830d497
commit
34305e9956
|
@ -54,7 +54,7 @@ export default class TightDecoder {
|
||||||
// Figure out filter
|
// Figure out filter
|
||||||
this._ctl = this._ctl >> 4;
|
this._ctl = this._ctl >> 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
let ret;
|
let ret;
|
||||||
|
|
||||||
if (this._ctl === 0x08) {
|
if (this._ctl === 0x08) {
|
||||||
|
@ -404,12 +404,11 @@ export default class TightDecoder {
|
||||||
let sabTest = typeof SharedArrayBuffer;
|
let sabTest = typeof SharedArrayBuffer;
|
||||||
if (sabTest !== 'undefined') {
|
if (sabTest !== 'undefined') {
|
||||||
this._enableQOI = true;
|
this._enableQOI = true;
|
||||||
if ((window.navigator.hardwareConcurrency) && (window.navigator.hardwareConcurrency > 8)) {
|
if ((window.navigator.hardwareConcurrency) && (window.navigator.hardwareConcurrency >= 4)) {
|
||||||
this._threads = window.navigator.hardwareConcurrency;
|
this._threads = 16;
|
||||||
} else {
|
} else {
|
||||||
this._threads = 8;
|
this._threads = 8;
|
||||||
}
|
}
|
||||||
this._workerEnabled = false;
|
|
||||||
this._workers = [];
|
this._workers = [];
|
||||||
this._availableWorkers = [];
|
this._availableWorkers = [];
|
||||||
this._sabs = [];
|
this._sabs = [];
|
||||||
|
|
|
@ -497,6 +497,7 @@ export default class RFB extends EventTargetMixin {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this._enableQOI = enabled;
|
this._enableQOI = enabled;
|
||||||
this._pendingApplyEncodingChanges = true;
|
this._pendingApplyEncodingChanges = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue