[webkit-gtk] Offscreen rendering

Nabil Madrane nmadrane at gmail.com
Sat Apr 18 09:52:50 PDT 2015


Hi,

I am trying to port libwebkitgtk to an embedded system running a media
center software called KODI. The hardware is ARM. I managed to
cross-compile libwebkitgtk and all its dependencies for ARM.

My goal now is to render a web page in memory and then put everything on a
OpenGL surface (because the media center software mentioned above uses
OpenGL).

I have 2 questions :

*1.* I plan to create an offscreen window (gtk_offscreen_window_new()), put
my webview in that offscreen window, then get the Cairo surface
(gtk_offscreen_window_get_surface()) and finally copy the Cairo surface
into an OpenGL texture with glTexImage2D().

Is that the right approach ?

*2.* When I tested the above approach in a simple helloworld program, I was
surprised to see an error about the display that could not be opened (I was
running my program from a remote terminal). So apparently, my program is
trying to use X11. I don't want to use X11, I just need to do plain memory
rendering with webkit. I found that webkit has different backends. One of
them is directfb. Would you please confirm that this is the right one to
use for my scenario ?

Thanks

Nabil.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-gtk/attachments/20150418/8da29fb8/attachment-0001.html>


More information about the webkit-gtk mailing list