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

use QOpenGLWindow::update to trigger the WVuMeter rendering #11698

Closed
wants to merge 1 commit into from

Conversation

m0dB
Copy link
Contributor

@m0dB m0dB commented Jul 1, 2023

Instead of rendering and swapping the opengl-based WVuMeter directly from WaveformWidgetFactory, call updateGL (through QOpenGLWindow::update()), similar to the mechanism used for WVuMeterLegacy.

@daschuer
Copy link
Member

daschuer commented Jul 1, 2023

I can confirm that this branch performs still good with Ubuntu Focal and
"4.6 (Compatibility Profile) Mesa 21.2.6 (Mesa Intel(R) UHD Graphics (CML GT2))"

@ronso0 ronso0 marked this pull request as draft July 1, 2023 10:14
@ronso0 ronso0 changed the title DRAFT: use QOpenGLWindow::update to trigger the WVuMeter rendering use QOpenGLWindow::update to trigger the WVuMeter rendering Jul 1, 2023
@m0dB
Copy link
Contributor Author

m0dB commented Jul 1, 2023

Thanks for confirming, @daschuer . Let's see if @JoergAtGithub and/or @NotYourAverageAl can test this on Windows.

(I have some additional tweaks, but I want to go one step at a time)

@m0dB
Copy link
Contributor Author

m0dB commented Jul 1, 2023

fixed formatting issue

@JoergAtGithub
Copy link
Member

Sounds promising. I will test it later this week!

@NotYourAverageAl
Copy link
Contributor

@m0dB You wont believe this but I can't reproduce this bug on 2.4. I updated my chipset driver and got a Windows update kb5027292 and cleaned out my mixxx settings folder. Apologies for all the noise, possibly just a system issue.

To note this PR works perfectly and I don't have any lag.

@JoergAtGithub
Copy link
Member

I tested this PR on my Windows 11 system and still see the lag in the UI. It might be, that this PR is slightly more responsive than the 2.4 branch, but with --disable-vumeterGL both branches are significiantly more responsive.

@m0dB
Copy link
Contributor Author

m0dB commented Jul 7, 2023

Ok, that's too bad. And strange that you are both seeing something else.

I found another solution: on macOS, --disable-vumetergl behaves badly. But: I believe this is basically caused by the use of QStylePainter. If I replace:

    QStyleOption option;
    option.initFrom(this);
    QStylePainter p(this);
    p.drawPrimitive(QStyle::PE_Widget, option);

with a simple

    QPainter p(this);

it runs smooth.

I believe the only thing the QStylePainter is used for is to set the background color. I already am determining the background color differently for the GL VuMeter so we could do the same here.

I will create a PR with this change. If this works well everywhere, I would prefer this because it would allow us to have the same implementation on all platforms.

@m0dB
Copy link
Contributor Author

m0dB commented Jul 8, 2023

Done in #11722 . This disables the GL based VuMeter by default and enables an improved legacy VuMeter (no QStylePainter).

@JoergAtGithub
Copy link
Member

I think this PR can be closed?

@m0dB
Copy link
Contributor Author

m0dB commented Jul 15, 2023

yes! thanks.

@m0dB m0dB closed this Jul 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants