Repository navigation
fix(window): prepare the first frame and revalidate drawable metrics - #94
Merged
sudoevolve merged 3 commits intoOct 10, 2026
Merged
Conversation
This was referenced Oct 8, 2026
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.
问题
修复 #93。Mirage 的持续拖拽整窗黑闪还有应用侧逐帧直接设置尺寸的因素:上游修复单独接入后,真实 XWayland/合成器测试仍捕获频闪;应用改用已有
beginWindowResize后维护者实测频闪消失。该 PR 只修复已独立复现的 EUI 首帧与尺寸失效问题,不能将它单独宣称为 Mirage 拖拽频闪的完整修复。自绘窗口在输入回调中调整原生尺寸后,入口仍按输入前的尺寸绘制并交换缓冲;冷启动则在渲染初始化和首次绘制之前就显示窗口。结果是缩放时提交内容不完整的帧,以及启动时暴露尚未绘制的窗口。
最小复现:320×240 的窗口在
MainWindowRuntime更新后的回调中改为 480×360。修复前探针稳定报告presented old-size frame after resize during update和resize lost pending repaint。修改
frame_presentation_probe:真实窗口更新期缩放、新尺寸提交、首帧显示回调时序及仅执行一次、再次变化/DPI/指针比例失效、零尺寸及恢复、空闲不提交。更新集成文档,明确 onStart 仍隐藏,初次显示由入口负责。复用已有布局、缓存、重绘和唤醒机制,没有延时猜测、持续强制重绘或新的并发设施。默认底层
WindowCreateRequest仍可见,现有直接窗口消费者保持原行为;变更入口的初次显示时序。影响
MainWindowRuntime属于内部入口实现。本机环境
验证
四组合均从本 PR 分支配置并构建全部测试 fixtures,随后执行全部 ctest:
/tmp/eui-frame-glfw-opengl/tmp/eui-frame-sdl2-opengl/tmp/eui-frame-glfw-vulkan/tmp/eui-frame-sdl2-vulkan命令(各目录替换对应 backend):
cmake -S . -B /tmp/eui-frame-glfw-opengl -G Ninja -DCMAKE_BUILD_TYPE=Release \ -DEUI_WINDOW_BACKEND=glfw -DEUI_RENDER_BACKEND=opengl \ -DEUI_BUILD_TEST_FIXTURES=ON -DEUI_BUILD_APPS=OFF -DEUI_BUILD_USER_APPS=OFF cmake --build /tmp/eui-frame-glfw-opengl --parallel 3 xvfb-run -a env -u WAYLAND_DISPLAY XDG_SESSION_TYPE=x11 SDL_VIDEODRIVER=x11 \ ctest --test-dir /tmp/eui-frame-glfw-opengl --output-on-failureempty_windowfixture 并检查像素/截图;新增探针真实调用原生 resize。-fsanitize=address,undefined)通过。验收边界:自动探针保证绘制/提交使用有效尺寸和准备后的显示时序;私有 Xvfb 直接读取原生窗口时,映射与首个 swap 之间仍可能读到窗口系统的短暂空表面,不宣称窗口系统 map/swap 原子化或所有平台绝对无黑帧。没有提交以 clear-only 黑帧替代应用内容。后续真实 GNOME/XWayland 上,框架修复单独接入仍有 149/300 黑色中心样本;Mirage 改用既有 beginWindowResize 后,维护者物理拖拽确认顺畅无黑闪。该应用修复不包含在本 PR。Windows、macOS、原生 Wayland 和其他合成器仍需维护者在对应环境验收。