没有合成器的窗口渲染如何工作?

发布于 2025-01-10 23:31:23 字数 352 浏览 7 评论 0原文

在具有合成器的系统上,窗口应用程序必须渲染到离屏缓冲区中,然后将其提交给合成器进行合成和呈现。在没有合成器的情况下如何显示窗口桌面?

假设我们有一个 3D 应用程序,使用双缓冲渲染到窗口中,并在每个帧上完全重绘。这是我对呈现新帧的过程的理解:

  1. 应用程序提交一个帧缓冲区进行呈现。
  2. 合成器接收缓冲区。
  3. 随后,合成器将所有窗口合成到屏幕的后台缓冲区中。
  4. 合成器交换屏幕的缓冲区。

如果没有合成器,第 1 步之后会发生什么? (例如,在没有 DWM 的 Windows 上,或在 X 服务器上。)显然,某些东西正在布置窗口并确保它们以正确的位置和顺序呈现。这与合成有何不同?

On systems with a compositor, a windowed application must render into an off-screen buffer, which is then submitted to the compositor for composition and presentation. How does displaying a windowed desktop work without a compositor?

Suppose we have a 3D application using double buffering to render into a window, fully redrawing on each frame. This is my understanding of the process of presenting a new frame:

  1. Application submits a frame buffer for presentation.
  2. Compositor receives the buffer.
  3. Later, the compositor composites all the windows into the screen's back buffer.
  4. Compositor swaps the screen's buffers.

What happens after step 1 if there is no compositor? (For example, on Windows without DWM, or on an X server.) Clearly, something is laying out the windows and making sure they render in the correct position and order. How is that different from compositing?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文