Optimize touch control's canvas, use low-power profile and disable antialiasing

This commit is contained in:
redphx
2024-05-07 17:07:15 +07:00
parent d1b99705e6
commit b9355d5c01
3 changed files with 28 additions and 2 deletions

View File

@@ -9,7 +9,10 @@ export function takeScreenshot(callback: any) {
return;
}
const $canvasContext = $canvas.getContext('2d')!;
const $canvasContext = $canvas.getContext('2d', {
alpha: false,
willReadFrequently: false,
})!;
$canvasContext.drawImage($video, 0, 0, $canvas.width, $canvas.height);