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

skins/QMLDemo: Add channel VU meters #3932

Merged
merged 2 commits into from
Jun 1, 2021
Merged

Conversation

Holzhaus
Copy link
Member

@Holzhaus Holzhaus commented Jun 1, 2021

No description provided.

@Holzhaus Holzhaus added this to In progress in QML GUI via automation Jun 1, 2021
@github-actions github-actions bot added the skins label Jun 1, 2021
Copy link
Member

@Swiftb0y Swiftb0y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM otherwise

property string key // required
property color barColor // required

radius: width / 2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for performance reasons, we could consider disabling antialiasing for this Rectangle because i don't think it makes a difference here. https://doc.qt.io/qt-5/qml-qtquick-rectangle.html#performance

anchors.bottom: parent.bottom
anchors.margins: 1
height: control.parameter * (parent.height - 2 * anchors.margins)
radius: width / 2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same antialiasing performance optimization here.

@Swiftb0y
Copy link
Member

Swiftb0y commented Jun 1, 2021

An alternative to masking would also be to abuse clipping, but I'm not sure if that would improve or worsen performance.

@Holzhaus
Copy link
Member Author

Holzhaus commented Jun 1, 2021

My original implementation was just modifying the height of the rectangle, but that doesn't work if I want to use multiple colors (because the gradient would shrink accordingly).

@Swiftb0y
Copy link
Member

Swiftb0y commented Jun 1, 2021

Yeah that makes sense. I'm just worried about creating too many transparent objects which result in a bunch of draw calls that can't be batched together. abusing clipping would still result in the same amount of draw calls, but might be faster because it can be done by the GPU and is less complicated (its just clipping a rectangle instead of masking on texture based on another texture).

@Swiftb0y
Copy link
Member

Swiftb0y commented Jun 1, 2021

I'll go ahead and merge now that antialiasing has been disabled for the component.

@Swiftb0y Swiftb0y merged commit 646583c into mixxxdj:main Jun 1, 2021
QML GUI automation moved this from In progress to Done Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants