Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
waveformseekbar: Enhance the redraw performance and frequence #2289
I carefully enhanced the performance by using Cairo's clipping mechanism. Now, only the minimum required region of the waveform is queued for redraw.
Then the interval time between the redraws is computed depending on the width of the waveform and the length of the song. With a 2'50 song rendered on half of a MacBookPro 13", the redraw happens every ~250 milliseconds (4 times more than currently). On a full screen MacBookPro 13" it happens every ~90 milliseconds. Due to the careful handling of the clip rectangle, the occupation of the CPU shows no real difference.
referenced this pull request
Mar 4, 2017
song-started is after app.player.song changes, song-changed is after any tags of the provided songs have changed.