reduce GUI lag/stuttering by eliminating unnecessary work #18132
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Whenever a widget is refreshed in darkroom view, the entire window is redrawn and a lot of other activity is kicked off, including running the coordinate transform chain (which gets very slow if there are any active instances of liquify) multiple times. This PR reworks things (short of the complete rearchitecting of expose() which is actually needed) to reduce the number of calls for transforms and the amount of work done in mouse-motion callbacks.
The latter also fixes a subtle UI bug -- when modules have a drawn mask and the shapes display is enabled, but the module itself is disabled, the mouse still interacts with the (invisible) drawn shapes. This leads to surprises such as a scroll or drag resizing/moving a shape rather
than zooming/panning the image. It may be worth cherry-picking 648a74b for 5.0.1.