3 ms·
They should use the desynchronized canvas flag for lower latency on the ink example. canvas.getContext('webgl', {desynchronized: true}) https://www.chromestat
by markdog12 7y ago
They should use the desynchronized canvas flag for lower latency on the ink example.
canvas.getContext('webgl', {desynchronized: true})
https://www.chromestatus.com/feature/6360971442388992 https://www.chromestatus.com/feature/6360971442388992
- mkl 7y agoThat seems like it would have to happen within CanvasKit itself, as the code using it only uses abstractions over the canvas itself. I can't find anywhere in CanvasKit where it does getContext('webgl'), only '2d', so I'm not sure how it's doing it. The latency of that example seems great with a mouse, and a little laggy with a pen (a bit better than a pure canvas drawing app I've been working on). The frame rate is much better than my app.