Greenfield - Html5 Wayland Javascript compositor

Erik De Rijcke derijcke.erik at gmail.com
Thu Nov 23 14:09:47 UTC 2017


Hi all,

Some time ago I mentioned project Westfield and how it could be used to
create an html5 wayland compositor.

Today I'm proving I was not lying :)

I've recorded a short clip to demonstrate what it looks like:

https://www.youtube.com/watch?v=2lyihdFK7EE


>From the description:

Html5 Wayland Javascript compositor running in the browser.
> https://github.com/udevbe/greenfield
> <https://www.youtube.com/redirect?q=https%3A%2F%2Fgithub.com%2Fudevbe%2Fgreenfield&v=2lyihdFK7EE&redir_token=iJXBVRRztaaoy5zr-75tiyOKckx8MTUxMTUzMTUzOUAxNTExNDQ1MTM5&event=video_description> What
> you see are native linux applications that are rendered inside the browser
> using WebGL. This is done by encoding each application in real-time to a
> h264 video stream. Each video frame is sent using UDP (webrtc) to the
> browser where it is decoded and composited on the screen. Each individual
> application is rendered inside an html5 canvas, which allows for extra
> special effects to be added (css styling, layout, ...) The wayland
> protocol is used to directly talk to the applications. This is implemented
> using a custom wayland protocol library (
> https://github.com/udevbe/westfield
> <https://www.youtube.com/redirect?q=https%3A%2F%2Fgithub.com%2Fudevbe%2Fwestfield&v=2lyihdFK7EE&redir_token=iJXBVRRztaaoy5zr-75tiyOKckx8MTUxMTUzMTUzOUAxNTExNDQ1MTM5&event=video_description>)
> and an intermediate server side 'delegate'.



Other perhaps noteworthy things:
- Alpha channel support is provided by using a separate h264 stream where
the alpha channel is first converted to gray-scale and then applied to the
alpha channel on the browser side using a webgl shader.
- pixman & libxkbcommon are used browser side by compilation to wasm (web
assembly).
- Each browser tab forks a separate isolated process on the server side
- gstreamer is used to encode to h264


cheers,

Erik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20171123/515f6912/attachment.html>


More information about the wayland-devel mailing list