performance improvement

This commit is contained in:
2026-05-28 14:00:38 +05:30
parent 0b5510636e
commit 413f06fb97
13 changed files with 1254 additions and 79 deletions

View File

@@ -16,7 +16,10 @@ export const FrameCanvas = forwardRef<HTMLCanvasElement, Props>(function FrameCa
className="canvas-frame"
style={{ aspectRatio: `${video.width} / ${video.height}` }}
>
<canvas ref={ref} width={video.width} height={video.height} />
{/* Backing-store width/height are set imperatively in drawBitmap so we
can cap it at the displayed (CSS) size × DPR — drawing 4K every frame
into a 1080p window is the main playback cost on slow systems. */}
<canvas ref={ref} />
{extracted && (
<div className="frame-extracted-banner">EXTRACTED</div>
)}