# WPEBackend Direct
[![License](https://img.shields.io/badge/License-BSD_2--Clause-orange.svg)](./LICENSE)
This code provides a very simple rendering backend for
[WPEWebkit](https://wpewebkit.org/) on Linux.
The unique purpose of this backend is to render the output of the WPEWebkit
compositor into an X11 or Wayland surface using EGL and directly from the
WPEWebProcess process. There is no inter-processes exchange of any buffer to
the user application.
This backend can help debugging the WPEWebkit rendering system by offering a
direct view of the compositor output.
## Build dependencies
To build the backend you will need the development dependencies for
libWPEWebKit-1.0 (minimum version 2.38) and libwpe-1.0 (minimum version 1.14).
You can install those dependencies from your OS packaging system or you can
build them yourself (preferred way as it would include specific patches).
### On Ubuntu Jammy
If you are using Ubuntu Jammy (22.04 LTS), you can call directly the
*scripts/webkit* script to build locally all dependencies and open a shell with
all needed environment variables set to proceed with the backend build.
```shell
./scripts/webkit
```
### On other Linux distributions
If you are using another Linux distribution, you can use the provided
*script/Dockerfile* to build a container with all the dependencies inside.
To build the container call:
```shell
docker build --tag webkit-dev ./scripts
```
And to launch the build environment (with an X11 server on the host):
```shell
docker run -ti --network host -e DISPLAY=$DISPLAY -v ~/.Xauthority:/root/.Xauthority -v /tmp/.X11-unix:/tmp/.X11-unix -v .:/root/code webkit-dev
```
You will need to call `xhost +` on the host to authorize the docker container
to access the host X11 server.
If running from inside a docker container, and depending on your graphic card,
the hardware acceleration may be difficult to configure. In this case, a local
build of the dependencies is preferable. The *scripts/webkit* script should
work on all Linux distributions except for the `install_build_deps` function
which is specific to Ubuntu Jammy but this function may be easily ported to
different distributions.
## Build the backend and the sample application
Once inside the build environment (initialized with the *scripts/webkit*
script if you've built the dependencies yourself), call:
```shell
meson setup build
ninja -C build
```
It will build the backend library into *build/backend* and the sample
application into *build/webview*. Before launching the `webview` application
you must ensure that `LD_LIBRARY_PATH` environment variable points to the
*build/backend* directory.
## Use the direct backend to help debugging WPEWebkit rendering system
You need to have built the WPEWebkit dependencies yourself. Just define the
environment variable `WEBKIT2_PAUSE_WEB_PROCESS_ON_LAUNCH=1` before launching
the `webview` sample application and then connect your debugger to the
*WPEWebProcess*.
If you have built *libWPEWebKit-1.0.so* in debug mode, you may need to replace
*scripts/webkit-2.38/dist/lib/libWPEWebKit-1.0.so.3.18.9* by
*libWPEWebKit-1.0.so.debug* as the *scripts/webkit* script strips the library
debug symbols by default to prevent huge loading times when not needing to
directly debug the WPEWebkit library.
没有合适的资源?快使用搜索试试~ 我知道了~
WPEWebkit后端从WPEWebProcess直接渲染到X11窗口或Wayland曲面.zip
共32个文件
h:9个
cpp:9个
patch:4个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 51 浏览量
2023-10-13
17:36:33
上传
评论
收藏 42KB ZIP 举报
温馨提示
WPEWebkit后端从WPEWebProcess直接渲染到X11窗口或Wayland曲面.zip
资源推荐
资源详情
资源评论
收起资源包目录
WPEWebkit后端从WPEWebProcess直接渲染到X11窗口或Wayland曲面.zip (32个子文件)
WPEBackend-direct-main
.editorconfig 147B
meson.build 676B
backend
meson.build 2KB
wpebackend-direct.h 2KB
wpewebprocess-side
NativeSurface.h 3KB
RendererBackendEGLTarget.cpp 5KB
RendererBackendEGLTarget.h 3KB
RendererBackendEGL.h 2KB
RendererBackendEGL.cpp 3KB
NativeSurface.cpp 9KB
common
ipc.h 3KB
ipc.cpp 5KB
ipc-messages.h 2KB
wpebackend-direct.cpp 5KB
application-side
RendererHostClient.cpp 2KB
ViewBackend.cpp 3KB
RendererHost.cpp 3KB
ViewBackend.h 3KB
RendererHostClient.h 2KB
RendererHost.h 2KB
.gitattributes 39B
.clang-format 103B
LICENSE 1KB
main.cpp 3KB
.gitignore 1KB
README.md 3KB
scripts
wpewebkit-patches
001-fix-webgl-compositing.patch 9KB
002-add-web-security-option.patch 6KB
004-disable-wpebackendfdo-audio-extension.patch 2KB
003-wait-for-wpewebprocess.patch 1000B
webkit 5KB
Dockerfile 1KB
共 32 条
- 1
资源评论
GZM888888
- 粉丝: 174
- 资源: 2939
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- cutcamera1715961370938.png
- 基于MATLAB的图像处理课程设计报告.doc
- tensorflow-gpu-2.6.0-cp38-cp38-manylinux2010-x86-64.whl
- mmexport1715960553858.png
- tensorflow-gpu-2.6.0-cp37-cp37m-manylinux2010-x86-64.whl
- 通过 .NET 应用程序中的源代码查找 SQL 注入
- 电子设计竞赛2007年B题 无线识别装置.doc
- Wox全局搜索工具,一款win下的全局搜索软件
- 使用高级集群管理 (ACM) 模板来管理用户、组和命名空间
- 电子设计竞赛2007年A题 音频信号分析仪.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功