[wpe-webkit] Backend objects for multiple WebViews

Ryan Walklin ryan at testtoast.com
Mon Jun 10 04:44:47 PDT 2019

Hi again,

On Wed, 5 Jun 2019, at 11:23 PM, Adrian Perez de Castro wrote:

> Rendering to subsurfaces is known to work. Probably the most straightforward
> achieving that is to use the “.export_buffer_resource” callback, which makes
> the FDO backend give you a “wl_resource” with a buffer, and in the callback
> use “eglCreateImageKHR()” + “eglCreateWaylandBufferFromImageWL()” to turn it
> into a “wl_buffer” which finally you can use with “wl_surface_attach()” on
> the subsurface. You will also want to add a callback on the “wl_buffer” to
> know when the compositor has committed it, which is a good location to call
> “wpe_view_backend_exportable_fdo_dispatch_release_buffer()”.
> (Let me know if you run into trouble or have doubts, I wrote the above
> quickly and the explanation might be a bit too terse.)

So I've managed to get a solid resource lifecycle working, and am part-way through moving to a subsurface-based render loop, however moving to the resource API made me wonder about WebGL, and I've tried a couple of WebGL-based sites which don't work with this approach, so went back and tried the old single view with EGL-backed rendering, and this didn't work either. 

Then I tried Cog, and it seems Cog can't show WebGL-based sites even with  webkit_settings_set_enable_webgl(settings, 1) turned on. Is this a known issue? Is there any way to get WebGL working?



More information about the webkit-wpe mailing list