Wrap wp2 into timed

This commit is contained in:
Ingvar Stepanyan
2020-11-02 16:35:40 +00:00
committed by Ingvar Stepanyan
parent 90706159fc
commit 83d5357ac0

View File

@@ -88,14 +88,14 @@ async function wp2Encode(
const { encode } = await import( const { encode } = await import(
/* webpackChunkName: "process-wp2-enc" */ /* webpackChunkName: "process-wp2-enc" */
'../wp2/encoder'); '../wp2/encoder');
return encode(data, options); return timed('wp2Encode', () => encode(data, options));
} }
async function wp2Decode(data: ArrayBuffer): Promise<ImageData> { async function wp2Decode(data: ArrayBuffer): Promise<ImageData> {
const { decode } = await import( const { decode } = await import(
/* webpackChunkName: "process-wp2-dec" */ /* webpackChunkName: "process-wp2-dec" */
'../wp2/decoder'); '../wp2/decoder');
return decode(data); return timed('wp2Decode', () => decode(data));
} }
async function avifEncode( async function avifEncode(