窗口首帧绘制前已显示;更新回调调整尺寸后仍提交旧尺寸帧
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 18/100
Research direction
Start with the window creation path in core/window/window_backend.cpp and the update loop in core/app/main_window_runtime.h, then compare the GLFW and SDL2 app mains in core/app/glfw_app_main.cpp and core/app/sdl2_app_main.cpp. The issue's reproduction is a probe that resizes the window during an update and checks whether an old-size frame is presented and whether the repaint request survives; that probe is the first thing to find or write. Done means a frame is not presented at the stale size, the pending repaint is kept, and the window is shown only after a valid first present, verified on GLFW and SDL2 with OpenGL and Vulkan.
Written by the indexing model from the issue text.
Description
真实桌面后续定位(2026-10-08)
下面两项框架缺陷可独立复现,但不是 Mirage 持续拖拽整窗黑闪的全部原因。只接入框架修复后,真实 XWayland + GNOME 合成器采样仍有 149/300 次中心黑色;Mirage 自绘缩放此前每帧直接调用 glfwSetWindowPos/glfwSetWindowSize,没有复用已有 beginWindowResize。改为系统原生缩放接管后,维护者物理鼠标实测拖拽顺畅、无黑闪。应用侧单独修复,框架 PR 仅对以下首帧/失效尺寸路径负责。
问题
Mirage 使用 EUI-NEO 的无边框窗口,在应用自绘边缘拖动缩放时出现黑色频闪,冷启动时偶发黑帧。核查上游 dev(c444e53)后发现,两个现象均涉及窗口内容尚未准备好就暴露/提交的问题。
最小复现
- GLFW + OpenGL 下创建 320×240 窗口,初始化 DSL app。
- 使用
MainWindowRuntime::updateAndRender,传入当前 drawable 尺寸。 - 在更新完成后的回调中调用
glfwSetWindowSize(window, 480, 360),与自绘窗口的输入回调修改原生尺寸具有相同的执行顺序。 - 检查本次更新是否提交帧、是否保留下一帧重绘请求。
本机最小探针在未修复版本稳定失败:
frame_presentation_probe: presented old-size frame after resize during update
frame_presentation_probe: resize lost pending repaint
启动路径也可用现有 empty_window fixture 观察:GLFW/SDL2 创建窗口默认已显示,随后才初始化渲染后端、执行 onStart、compose 和首次 present。冷启动或初始化较慢时,窗口已可见但尚无应用内容。
根因
core/window/window_backend.cpp:窗口立即可见。core/app/glfw_app_main.cpp与sdl2_app_main.cpp:读取尺寸后进入更新,应用输入/compose 回调可以改变窗口尺寸。core/app/main_window_runtime.h:未检查更新后的 drawable/DPI/指针比例变化,继续用旧尺寸绘制及 present,且 markRendered 会清除回调设置的 paintRequested。- DSL 子窗口走类似创建/更新/提交路径,需要保持一致。
预期
- 应用窗口在首次有效内容提交后才显示;渲染初始化失败时不闪出空窗口。
- 更新阶段改变 drawable 尺寸或比例后,不提交旧尺寸帧,保留重绘请求并唤醒主循环,在下一次有界更新中用新尺寸重新布局。
- 不通过关闭透明度、禁用缓存、添加延时或强制持续重绘掩盖问题。
建议修复与验证
复用现有窗口创建请求增加内部可见性选项(默认行为兼容);App runner 隐藏创建主/子窗口并在有效 present 后显示。帧节拍等待后重新读取尺寸,更新后再次核对,变化时延期绘制并请求下一帧。新增跨后端回归探针,验证正常绘制、更新期尺寸变化、比例变化、无效尺寸及恢复。
按 CONTRIBUTING.md 在独立目录验证 GLFW/SDL2 × OpenGL/Vulkan 的 Release 配置、构建、测试,并运行相关 fixture;测试结果随修复 PR 提供。无新增依赖或资源。
- Dominant language
- C++
- Stars
- 2k
- Forks
- 177
- Avg merge
- 18h 12m
- Merged PRs (30d)
- 4
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sudoevolve/EUI-NEO
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
sudoevolve/EUI-NEO#90 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 18/100
sudoevolve/EUI-NEO#89 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
sudoevolve/EUI-NEO#45 · 5 comments ·
Maintainers usually reply within 1 day
-
关于安卓demo的讨论Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
sudoevolve/EUI-NEO#44 · 1 comment ·
Maintainers usually reply within 1 day
All issues in sudoevolve/EUI-NEO
Similar issues
-
agent:Windows bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
? - Needs Triage bot_watch bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
NVIDIA/cudf-spark-jni#5267 · 1 comment ·
Maintainers usually reply within 1 day
-
area/docdb kind/bug priority/medium status/awaiting-triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
yugabyte/yugabyte-db#34873 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day