-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Conversation
There was a problem hiding this 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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
An alternative to masking would also be to abuse clipping, but I'm not sure if that would improve or worsen performance. |
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). |
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). |
I'll go ahead and merge now that antialiasing has been disabled for the component. |
No description provided.