Bug 252988

Summary: [GTK] Use DMABuf and WebKit IPC for rendering instead of wpe/x11
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKitGTKAssignee: Diego Pino <dpino>
Status: RESOLVED FIXED    
Severity: Normal CC: balducci, bugs-noreply
Priority: P2 Keywords: Gtk
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 237649    

Description Carlos Garcia Campos 2023-02-27 06:15:50 PST
Instead of the wpe rendered, which uses a nested wayland compositor, and x11, which uses a redirected xcomposito window, we can make the web process render always into a pbuffer using mesa surfaceless platform and export the rendered texture using DMAbuf to be consumed by the UI process. This way the rendering is independent from the platform (wayland/x11), in the UI process we just import the DMABuf into a texture that we pass to GTK for rendering into the web view widget. If any of the required extensions is not available we can fallback to current platform dependent approach.
Comment 1 Carlos Garcia Campos 2023-02-27 06:21:59 PST
Pull request: https://github.com/WebKit/WebKit/pull/10726
Comment 2 EWS 2023-03-28 07:30:12 PDT
Committed 262210@main (d2424c0fc67f): <https://commits.webkit.org/262210@main>

Reviewed commits have been landed. Closing PR #10726 and removing active labels.
Comment 3 Diego Pino 2023-03-29 18:10:39 PDT
Re-opening for pull request https://github.com/webkit/webkit/pull/12153
Comment 4 Diego Pino 2023-03-29 18:18:51 PDT
Ubuntu 20.04 post-commit bot is failing after this patch:

https://build.webkit.org/#/builders/595/builds/8868

```
/home/buildbot/worker/GTK-Linux-64-bit-Release-Ubuntu-2004-Build/build/Source/WebKit/WebProcess/glib/WebProcessGLib.cpp:128:9: error: ‘m_displayForCompositing’ was not declared in this scope
  128 |         m_displayForCompositing = WebCore::PlatformDisplayHeadless::create();
```
Comment 5 EWS 2023-03-31 08:18:12 PDT
Committed 262405@main (84f510837198): <https://commits.webkit.org/262405@main>

Reviewed commits have been landed. Closing PR #12153 and removing active labels.
Comment 6 gabriele balducci 2023-04-15 01:26:33 PDT
*** Bug 254976 has been marked as a duplicate of this bug. ***