[wpe-webkit] Using WebKitWPE in an existing GMainLoop/Wayland render loop

Ryan Walklin ryan at testtoast.com
Sun May 5 15:47:39 PDT 2019


Hi,

Just as an update I've been able to get this working with Swift on Fedora 30 and rendering into a Wayland window via EGL.

I'll post the code and a link to GH once it's tidied up, but if anyone is interested in the details please let me know.

I've also been able to get HiDPI support working nicely, as per the comment here - https://bugs.webkit.org/show_bug.cgi?id=185764#c12. It requires a small libwpe patch also (https://github.com/WebPlatformForEmbedded/libwpe/pull/44). This would be trivial to add to Cog etc also.

Regards,

Ryan

On Sun, 21 Apr 2019, at 1:50 PM, Ryan Walklin wrote:
> Hi all,
> 
> I'm trying to integrate WebKitWPE into an existing Wayland App using 
> EGL for rendering (written in Swift on Fedora 30). I'm using a 
> CFRunLoop as my event loop, driving a GMainLoop event loop using code 
> similar to 
> https://gitlab.gnome.org/GNOME/gtk/blob/master/gdk/quartz/gdkeventloop-quartz.c. (In fact essentially this code ported to Swift). I then have a Wayland fd GSource similar to https://gitlab.gnome.org/GNOME/gtk/blob/master/gdk/wayland/gdkeventsource.c (again largely ported from here to Swift). 
> 
> This works well and I am able to create a window and run a simple EGL 
> renderer (essentially just clearing the screen and calling 
> eglSwapBuffers() as per 
> https://github.com/emersion/hello-wayland/blob/opengl-render-loop/main.c). 
> 
> However when I try to integrate WebKitWPE, I am able to create the 
> backend, context and view objects as Cog does, however when my event 
> loop then runs, I get a crash inside wayland-server:
> 


More information about the webkit-wpe mailing list