Re: [csswg-drafts] [resize-observer] why we need `ResizeObserver.takeRecords()` or `ResizeObserver.hasRecords()` (the canvas flickering problem) (#9717)

A solution [someone mentioned](https://stackoverflow.com/questions/15799564/flickering-during-resizing-of-html5-canvas) is to double buffer using two canvas (double the memory):

- after resize (f.e. in an RO callback) immediately write the other buffer back
- this is cheaper than re-rendering a whole 3D scene for example, but still has more overhead than ideal
- for one frame, the visual will be stretched or shrunk without further code

-- 
GitHub Notification of comment by trusktr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9717#issuecomment-1859313670 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Sunday, 17 December 2023 22:58:43 UTC