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

Broken rendering of Vectorscope #7518

Open
1 task done
michaelgregorius opened this issue Sep 25, 2024 · 6 comments
Open
1 task done

Broken rendering of Vectorscope #7518

michaelgregorius opened this issue Sep 25, 2024 · 6 comments
Labels

Comments

@michaelgregorius
Copy link
Contributor

michaelgregorius commented Sep 25, 2024

System Information

Linux - Wayland

LMMS Version(s)

1825208

Bug Summary

The Vectorscope plugin renders in a broken way on a Linux Wayland system:

Bildschirmaufnahme_20240925_170936.webm

Steps To Reproduce

  1. Add a Vectorscope as an effect.
  2. Open the view of the Vectorscope.

Please search the issue tracker for existing bug reports before submitting your own.

  • I have searched all existing issues and confirmed that this is not a duplicate.
@michaelgregorius
Copy link
Contributor Author

It works under X11 and therefore only is a problem under Wayland. It is caused by the calls to devicePixelRatio() here:

temp.setDevicePixelRatio(devicePixelRatio());

And here:

temp.scaledToWidth(displayWidth * devicePixelRatio(),

The method devicePixelRatio() returns 2 on my system whereas I have set my scaling to 125%, i.e. 1.25. The following code fixes the rendering on my machine:

//temp.setDevicePixelRatio(devicePixelRatio());
painter.drawImage(displayLeft, displayTop, temp.scaledToWidth(displayWidth, Qt::SmoothTransformation));

It might break another case though? I am not sure why it is necessary to use the device/pixel ratio here.

@michaelgregorius
Copy link
Contributor Author

There's also a problem with the general functionality under Wayland. The screen is not cleared if HQ mode is disabled but everything works in HQ mode:

Broken.Vectorscope.in.Non-HQ.webm

@michaelgregorius
Copy link
Contributor Author

With the fix described above the broken rendering starts to appear when the value of the variable displayWidth is equal or greater than activeSize.

@bratpeki
Copy link
Contributor

I noticed, on latest master, than it occurs only with a persistence of 1. This is expected, as I would believe there is no persistance for a value of 1 (that is 100%).

@michaelgregorius
Copy link
Contributor Author

Did you test it under Linux with Wayland, @bratpeki? It seem that upscaling pixmaps does not work on that platform like it works on X11.

@bratpeki
Copy link
Contributor

No, this is on Windows, works just fine!

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

No branches or pull requests

2 participants