KEMBAR78
GUI: Don't redraw whole dialog stack with kRedrawTopDialog by mikrosk · Pull Request #4953 · scummvm/scummvm · GitHub
Skip to content

Conversation

@mikrosk
Copy link
Contributor

@mikrosk mikrosk commented Apr 29, 2023

This is something I wanted to fix for a long time: https://bugs.scummvm.org/ticket/14364

Not only it drastically speeds up button and scrolling redraws but it makes tool tips pleasant to watch -- without this patch every tooltip freezes my backend for about 500 ms. You can imagine that user experience, one has to literally run away with mouse to avoid showing tooltips. ;) (EDIT: actually, I got carried away here -- tool tips of course still redraw the background upon closing; I've had another optimization implemented but it's not suitable for a PR yet).

As I'm not a GUI expert, putting this for review whether I haven't overlooked something obvious.

From what I could see, there is only one potential risk: if there is a dialog which has the Apply button which updates something in the parent dialog. I haven't found any case like that but maybe you know better. IMHO even with this limitation this optimization is worth it on any lowend platform (content of the parent dialog would be updated on close of the child).

@sev-
Copy link
Member

sev- commented Apr 29, 2023

Immediately, I was thinking about tooltips overlapping the current dialog, but upon testing your code change, I was not able to catch a case when there is garbage left on the screen.

As for the top dialog changing underneath, this is never the case.

So, merging this. Thanks!

@sev- sev- merged commit f824f8a into scummvm:master Apr 29, 2023
@mikrosk mikrosk deleted the gui_redraw branch April 29, 2023 10:37
@sluicebox
Copy link
Member

This breaks the smooth animation when dismissing the debug console. It doesn't redraw as it scrolls back up

image

@mikrosk
Copy link
Contributor Author

mikrosk commented May 11, 2023

@sluicebox will take a look, good catch!

mikrosk added a commit that referenced this pull request May 11, 2023
#4953 optimized redrawing of the top dialog in commit f824f8a. This
however broke console's sliding up as the code in question depended on
the fact that it was internally equivalent to a full redraw.
@mikrosk
Copy link
Contributor Author

mikrosk commented May 11, 2023

Fixed in master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants