bbc / VideoContext

An experimental HTML5 & WebGL video composition and rendering API.
http://bbc.github.io/VideoContext/
Apache License 2.0
1.33k stars 157 forks source link

Use canvas desynchronized rendering #154

Open germain-gg opened 5 years ago

germain-gg commented 5 years ago

It looks like a new WebGLContextAttribute has been introduced. It is called desynchronized and it will optimise in some cases the rendering by bypassing some steps in the redering pipeline.

Interestingly this can create some issues with the alpha option, which is something we should take in consideration when looking at #153 . It will only be a problem if alpha and desynchronized are both set to true and some DOM elements are stacked on top of the canvas element. Which will be very hard to detect within VideoContext and quite hard to explain in an error message.

More info: Low-latency rendering with the desynchronized hint

PTaylour commented 5 years ago

Thanks @gsouquet I'll take a look :)

PTaylour commented 5 years ago

@gsouquet have you used this attribute at all since we last spoke? The demo is impressive.

germain-gg commented 5 years ago

We are actually using that in prod for one of our video. Will try to create a PR for VideoContext. The good news is that we already use preserveDrawingBuffer