Weston 直接显示

Weston 扩展,指示合成器避免将 linux-dmabuf 协议创建的 dmabuf 导入到除显示控制器之外的任何地方。

合成器已经会尽可能使用直接扫描输出,但无法保证在此过程中不会先将 dmabuf 导入 GPU。此扩展确保客户端的合成器永远不会尝试导入 GPU,而是直接传递给显示控制器。

客户端可以利用此扩展将 dmabuf 缓冲区传递给显示控制器, potentially 提高性能并降低带宽使用。

最后,客户端可以将此扩展与 content-protection 结合使用,从而避免任何 GPU 交互并提供安全内容路径。此外,在某些情况下,dmabuf 分配的内存位于特殊设计的内存区域中,当 GPU 尝试读取时会被视为非法内存访问。

警告:此接口设计上可能会破坏截图功能,因为截图时可能涉及合成。另外请注意,如果提供的 dmabuf 无法被 KMS 导入,客户端连接将被终止。

警告:此扩展要求 linux-dmabuf 协议和 zwp_linux_buffer_params_v1 已由 zwp_linux_buffer_v1 创建。

参数
类型
描述
dmabufobject<zwp_linux_buffer_params_v1>
enable direct-display for dmabuf buffer
将缓冲区转发到显示控制器

此请求告知合成器不要将 dmabuf 导入 GPU,以完全绕过它,使缓冲区直接由显示控制器扫描输出。如果硬件不支持或没有可用资源直接扫描输出缓冲区,合成器应在原位安装占位符。合成器可以对 dmabuf 进行检查,如果 dmabuf 似乎无法直接使用,则拒绝创建 wl_buffer。

假设 zwp_linux_buffer_params_v1 已由 zwp_linux_dmabuf_v1_create_params 创建。

destroy()
销毁工厂对象

销毁工厂对象,但不影响任何其他对象。


合成器支持

Cage
Cage
0.2.0
COSMIC
COSMIC
1.0.0~beta.8
GameScope
GameScope
3.15.14
Hyprland
Hyprland
0.52.1
Jay
1.12.0
KWin
KWin
6.6
Labwc
Labwc
0.9.2
Louvre
Louvre
2.14.1
Mir
Mir
2.26
Muffin
Muffin
6.6.0
Mutter
Mutter
49.2
niri
niri
25.11
phoc
phoc
0.52
river
river
0.3.13
Sway
Sway
1.11
Treeland
Treeland
0.8.0
Wayfire
Wayfire
0.9.0
Weston
Weston
14.0.2
weston_direct_display_v1
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
1

Copyright © 2019 Collabora Ltd.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Footer

© 2026 Wayland Explorer

本网站与 Wayland 官方项目无任何关联。网站所有内容均根据 Wayland 协议 XML 文件自动生成。

本网站使用的 Visual Studio Code - Codicons 遵循 CC BY 4.0 许可。