Hacker News new | past | comments | ask | show | jobs | submit login

They should use the desynchronized canvas flag for lower latency on the ink example.

canvas.getContext('webgl', {desynchronized: true})


That 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.

Applications are open for YC Winter 2020

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact