feat(waylib): add sgrenderer damage tracking and vendored wlroots renderer#1136
feat(waylib): add sgrenderer damage tracking and vendored wlroots renderer#1136Groveer wants to merge 1 commit into
Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Groveer 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 |
zzxyb
left a comment
There was a problem hiding this comment.
建议参考wlroots,然后以C++风格去写,这样可以避免引入wlroots很多功能结构和文件
| @@ -0,0 +1,44 @@ | |||
| // SPDX-FileCopyrightText: 2017-2023 wlroots contributors | |||
There was a problem hiding this comment.
allocator不需要copy,可以直接使用wlroots,或者自己扩展实现
| #include <wlr/render/interface.h> | ||
| #include <wlr/render/pixman.h> | ||
| #include <wlr/render/wlr_renderer.h> | ||
| #include <wlr/types/wlr_drm.h> |
There was a problem hiding this comment.
不应该实现wlr_renderer。只需要实现pixman\vulkan\gles后端
| #include "render/pixel_format.h" | ||
| #include "types/wlr_buffer.h" | ||
|
|
||
| void wlr_texture_init(struct wlr_texture *texture, struct wlr_renderer *renderer, |
|
pixman要评估一下,是否可以不用自己实现?用wlroot上的wlr_pixman_renderer_create |
bd26afa to
2cffc9f
Compare
…derer Phase 1 — RHI path damage tracking: - Add WSGDamageTracker: collects dirty nodes via nodeChanged() callback (Qt 6.8 removed QSGNode::m_dirtyState), accumulates bounding boxes with DirtyDamageMask including DirtyMatrix - Add WSGDirtyNodeObserver: passive QSGAbstractRenderer registered on root node to receive nodeChanged() without displacing the real renderer - Wire into WBufferRenderer::ensureRenderer/render/destroySource - Replace m_damageRing.add_whole() with scanned dirty-node damage, combined with rotate_buffer() damage - Add Y-flip for mirrorVertically() scenarios - Add unit tests (18 cases covering all dirty flags, edge cases, Y-flip) Phase 2 — vendored wlroots 0.19 renderer: - Vendor gles2/vulkan/pixman backends, egl, dmabuf, allocator, swapchain infrastructure under sgrenderer/vendor/wlroots/ - Extension headers exposing buffer->FBO/Image conversion, texture handles, EGL context management for BAL consumption - CMake target waylib_sgrenderer_wlroots_vendor (static lib) - All Code Review fixes applied: underscore shader header names, wlr_egl_context for surface access, conditional WLR_HAS_GBM_ALLOCATOR, unified config.h includes, glslangValidator FATAL_ERROR Both phases passed Code Review.
1ec668d to
a3175b8
Compare
|
TAG Bot New tag: 0.8.15 |
Summary
为 waylib 实现全新的 QSGRenderer,支持 damage 跟踪并 vendor wlroots 渲染后端。
Implement a new QSGRenderer for waylib with damage tracking and vendored wlroots renderer backends.
Phase 1 — RHI path damage tracking
WSGDamageTracker: collects dirty nodes vianodeChanged()callback (Qt 6.8 removedQSGNode::m_dirtyState), accumulates bounding boxes withDirtyDamageMaskincludingDirtyMatrixWSGDirtyNodeObserver: passiveQSGAbstractRendererregistered on root node to receivenodeChanged()without displacing the real rendererWBufferRenderer::ensureRenderer/render/destroySourcem_damageRing.add_whole()with scanned dirty-node damage, combined withrotate_buffer()damagemirrorVertically()scenariosPhase 2 — vendored wlroots 0.19 renderer
sgrenderer/vendor/wlroots/waylib_sgrenderer_wlroots_vendor(static lib)wlr_egl_contextfor surface access, conditionalWLR_HAS_GBM_ALLOCATOR, unifiedconfig.hincludes,glslangValidator FATAL_ERRORBoth phases passed Code Review (18 unit tests).
Multica issue: WM-79