[vlc-commits] [Git][videolan/vlc][master] qml: don't run seekbar buffering animation when control is hidden
Hugo Beauzée-Luyssen (@chouquette)
gitlab at videolan.org
Tue Feb 8 08:06:27 UTC 2022
Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC
Commits:
a5a1fe7f by Pierre Lamot at 2022-02-08T07:48:04+00:00
qml: don't run seekbar buffering animation when control is hidden
the animation was running and forcing the scenegraph to render even when the
seekbar (in the miniplayer) is hidden, this reduce CPU load when the application
is idle.
- - - - -
1 changed file:
- modules/gui/qt/player/qml/SliderBar.qml
Changes:
=====================================
modules/gui/qt/player/qml/SliderBar.qml
=====================================
@@ -147,9 +147,20 @@ Slider {
radius: control.barHeight
states: [
+ State {
+ name: "hidden"
+ when: !control.visible
+ PropertyChanges {
+ target: bufferRect
+ width: bufferAnimWidth
+ visible: false
+ x: 0
+ animateLoading: false
+ }
+ },
State {
name: "buffering not started"
- when: Player.buffering === 0
+ when: control.visible && Player.buffering === 0
PropertyChanges {
target: bufferRect
width: bufferAnimWidth
@@ -160,7 +171,7 @@ Slider {
},
State {
name: "time to start playing known"
- when: Player.buffering < 1
+ when: control.visible && Player.buffering < 1
PropertyChanges {
target: bufferRect
width: Player.buffering * parent.width
@@ -171,7 +182,7 @@ Slider {
},
State {
name: "playing from buffer"
- when: Player.buffering === 1
+ when: control.visible && Player.buffering === 1
PropertyChanges {
target: bufferRect
width: Player.buffering * parent.width
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/a5a1fe7ff864280ab3ec06903a617d920e4ec15f
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/a5a1fe7ff864280ab3ec06903a617d920e4ec15f
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list