fix(waylib): preserve output identity in frame callbacks - #1391
Merged
Conversation
1. Pass the emitting output to doRender from the native frame listener. 2. Preserve all-output rendering for explicit render() calls. 3. Add a headless regression covering output-local and explicit rendering. Log: Restore output-local frame scheduling on multi-monitor setups Influence: 1. Verify that a frame event only commits its originating output. 2. Verify that explicit render() still commits all ready, dirty outputs. 3. Verify output listener teardown during hot-unplug and window destruction. fix: 恢复帧回调中的输出身份 1. 在原生 frame 监听回调中将事件所属输出传入 doRender。 2. 保持显式 render() 调用遍历全部输出的行为。 3. 添加 headless 回归用例,覆盖单输出帧事件和显式渲染。 Log: 恢复多显示器环境下按输出独立调度帧的行为 Influence: 1. 验证 frame 事件只提交其所属输出。 2. 验证显式 render() 仍提交全部就绪且有更新的输出。 3. 验证热拔插及渲染窗口销毁时正确移除输出监听。
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: zccrs The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's GuideThe PR restores frame-event output identity by passing the originating wlr_output directly into doRender(), preventing one output’s native frame event from rendering other outputs while preserving explicit all-output rendering; a headless/software regression test covers both behaviors. Sequence diagram for output-specific native frame renderingsequenceDiagram
participant WlrOutputA as wlr_output_A
participant Listener as FrameListener
participant RenderWindow as WOutputRenderWindow
participant Renderer as doRender
WlrOutputA->>Listener: frame event
Listener->>RenderWindow: doRender(wlrOutput_A, outputs, false, true)
RenderWindow->>Renderer: doRender(wlrOutput_A, outputs, false, true)
Renderer-->>WlrOutputA: render and commit only output A
Sequence diagram for explicit all-output renderingsequenceDiagram
participant Caller
participant RenderWindow as WOutputRenderWindow
participant Renderer as doRender
Caller->>RenderWindow: render()
RenderWindow->>Renderer: doRender(nullptr, outputs, false, true)
Renderer-->>Caller: render and commit all outputs
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题 / Problem
移除 qwlroots 的提交
9582881dd将 frame 回调改为调用无参WOutputRenderWindow::render(),并将此前从sender()获取的输出替换为nullptr。这使needsFrameOutput的过滤分支失效:任意输出的 frame 事件都可能渲染、提交其他就绪且有更新的输出。Commit
9582881ddremoved qwlroots and replaced the frame callback's output identity withnullptr. Native frame events consequently scanned every output instead of limiting rendering and commits to the output whose frame event fired.修改 / Changes
在现有、受生命周期管理的 frame listener 中捕获所属
wlr_output,直接传给doRender()。保持显式无参
render()遍历全部输出的行为,不改动needs_frame调度和 listener 清理方式。添加使用真实 headless 输出和 software renderer 的回归测试,覆盖 A/B 各自的 frame 事件以及显式全输出渲染。
Capture the originating
wlr_outputin the existing lifetime-managed frame listener and pass it directly todoRender().Preserve explicit all-output
render()calls,needs_framescheduling, and listener teardown.Add a regression test using real headless outputs and the software renderer, covering each output's native frame event and explicit all-output rendering.
基于最新
master(2f5bb78f3)创建的独立提交;不包含 WSG batch renderer 或 damage tracker 改动。One isolated commit based on
master(2f5bb78f3), without WSG batch renderer or damage tracker changes.验证 / Verification
waylibserver及相关测试。nullptr行为时失败:A/B 任一 frame 都提交两个输出。修复后仅提交对应输出,显式render()仍提交两个输出。test_output_frame、test_wscoplistener、test_wobject_listeners。The two-output smoke failed with the old
nullptrbehavior (both outputs committed for either native frame), and passed with this fix (only the originating output committed; explicit rendering still committed both). All three focused tests passed. The retained test uses 60 Hz / 144 Hz headless outputs with explicitly delivered native frame events.验证范围为 headless/software 渲染和 listener 单元测试;未进行真实 DRM 多显示器或热拔插验证。
Validation covers headless/software rendering and listener unit tests; physical DRM multi-monitor and hot-unplug testing was not performed.
Summary by Sourcery
Preserve output identity in frame callbacks while retaining explicit all-output rendering behavior.
Bug Fixes:
Tests: