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

WIP Fixes for transformed outputs with mirroring #1091

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ids1024
Copy link
Member

@ids1024 ids1024 commented Dec 24, 2024

Also applicable to #1058.

Looks like damage tracking for mirroring with output transforms isn't quite right either (before or after this) so some more fixes are needed.

@ids1024
Copy link
Member Author

ids1024 commented Dec 24, 2024

I'm not sure the centering is always right either, in some circumstances, though I'll have to test if that's still an issue after other changes.

Apply inverse of output transform to mode to get render size, and apply
no transform during rendering. The transform of the output being
mirrored from shouldn't affect the final render.

Fixes issues when source output for mirroring has a transform, and also
fixes issues in #1058
when this code is used for postprocessing, where this resulted in the
same transform being applied twice.
Careful use of the right `VacantEntry` and `OccupiedEntry` methods makes
this possible without hacks or lifetime errors.
The actual render will pass a scale other than 1.0 here, so this needs
to do the same.
To determine if `mirroring_state` is needed, we want to compare the
untransformed dimensions of the source output to the target outputs
mode. The fact the mode comparision previously compared refresh rate
(since it compared the whole `Mode`) seems unintended.

We also re-create the `MirroringState` when the source output
dimensions changes.
@ids1024
Copy link
Member Author

ids1024 commented Jan 18, 2025

Rebased and fixed the centering (it was actually using the right position, but stretching incorrectly with a scale factor).

I'm not really sure about the damage tracking(?) issue I see when the target output of mirroring is rotated. I see one side of the screen update correctly when scrolling (for instance) while the other side is unchanged, and updates after a delay.

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

Successfully merging this pull request may close these issues.

1 participant