Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output transform not applied to damage by DrmCompositor #1651

Open
ids1024 opened this issue Jan 29, 2025 · 2 comments
Open

Output transform not applied to damage by DrmCompositor #1651

ids1024 opened this issue Jan 29, 2025 · 2 comments

Comments

@ids1024
Copy link
Member

ids1024 commented Jan 29, 2025

This can be tested in Anvil using Super+Shift+R to rotate the screen, then dragging around a terminal. Maybe FB_DAMAGE_CLIPS handling varies by GPU, but I see clearly incorrect results. The same issue occurs in cosmic-comp.

It seems renderer_damage in render_frame doesn't have the output transform applied. Neither render_frame, nor OutputDamageTracker::damage_output_internal applies the transform to the damage.

@ids1024
Copy link
Member Author

ids1024 commented Jan 29, 2025

self.primary_plane_damage_bag
    .add([output_geometry.to_logical(1).to_buffer(
        1,
        Transform::Normal,
        &output_geometry.size.to_logical(1),
    )]);

A transform could be applied here, but I don't know if RenderOutputResult.damage should already be transformed.

It does seem a bit odd that DrmCompositor would get a Physical rectangle, then call to_logical and to_buffer.

@YaLTeR
Copy link
Contributor

YaLTeR commented Jan 29, 2025

Not sure if this is relevant, but I'm pretty sure that damage is also not transformed correctly for the winit backend. You can see it with the debug tint, or if you use any transform other than Flipped180.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants