-
Notifications
You must be signed in to change notification settings - Fork 108
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
Fixes for transformed outputs with mirroring #1091
base: master
Are you sure you want to change the base?
Conversation
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. |
93f0644
to
c6c02e7
Compare
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. |
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.
c6c02e7
to
30e3d80
Compare
It looks like the damage issue is an issue in Smithay with transform handling in general, though it becomes more apparent here than in some other situations: Smithay/smithay#1651 I guess then that doesn't need to be fixed here, and is a separate issue. |
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.