forked from surge-synthesizer/surge
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize VU Meter Draw (surge-synthesizer#640)
The VU Meter was a cause of substantial idle load. In a 30 second timer sample, a full half second was spent drawing background images - as much time as was spent filling up the audio buffer with no sound. There were a couple of key reasons for this: 1. The VU Meter invalidates every idle even if value hasn't changed 2. When the VU meter invalidates even legitimately it forces a full repaint of the background image into a clip rect because that's what VSTGUI::CViewContainer does So - somewhat unsatisfactorily in the second case - this diff fixes those by only invalidating when value changes (which is great for idle) and supressing the background image repaint using knowledge of the placement of the VU meter (which is fragile and unsatisfying but the only option we have given the protection of VSTGUI::CFrame's final status and so on). While at it, replace the pixel painted edges so the VU meeter has a better boundary when zoomed. Closes surge-synthesizer#639 - Re-Implement VU Meter Addresses parts of surge-synthesizer#446 and surge-synthesizer#556; performance and pixely bits Former-commit-id: 0e650308bda2a949e7c32265c3c534c9252835ec [formerly b51bdd2] Former-commit-id: 075d28ec6fb51087fe96dcac3aa76def95574427 Former-commit-id: ce8d1c8ea41323ee2fce9dab210c644cbc9de14a
- Loading branch information
Showing
4 changed files
with
68 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters