New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor GUI rendering: Add documentation and name Viewport
consistently
#8257
Refactor GUI rendering: Add documentation and name Viewport
consistently
#8257
Conversation
This will need fixups, because the commit checker won't let me indent a nested #define.
Hash mark must go in first column, as per https://wiki.openttd.org/Coding_style#Other_important_rules
Since they are only ever called with an int and a (int)uint; the templating seems completely unnecessary and redundant.
This reverts commit 8652a4d. This is necessary to aid in the cherry-picking of commits from JGRPP.
…g window list. This is to speed up marking all viewports dirty, which is done very frequently.
…acked for later redrawing Track dirty viewport areas seperately form general screen redraws. Maintain a dirty block grid per viewport, with a smaller block size. Use even smaller block size in viewport map mode. Use a rectangle array for general screen redraws instead of a block grid. Add a dirty bit to windows and widgets, to simplify the common case of repainting a whole window or widget, without catching neighbouring windows or viewports.
AddDirtyBlocks is an internal implementation detail of SetDirtyBlocks, and its name should reflect that.
The viewport cache is transparently managed by the ViewportData struct, and memory associated with the viewport and cache is automatically managed using smart pointers.
Partially re-applies 8652a4d, which was reverted to allow commits to be cherry-picked from JGRPP.
Some places in the codebase misspell 'Viewport' as 'ViewPort' or 'view_port'. This patch makes everything consistent.
When I said split the viewport rename out into a separate PR, I meant that it should precede it and have nothing to do with the GUI rendering PR. Currently this just serves to bloat the size of the whole PR, making changes to code you've just added. And make it more difficult to review, since you've basically just duplicated the PR 3 times over. |
So the renaming of |
I'm not really sure what you want me to do. I've split the PR into three separate branches so they can be reviewed separately. Clearly, they can't all be based on the same version of |
I want this PR to deal with renaming ViewPort and only renaming ViewPort. None of the other changes. |
That is more-or-less exactly what it does. Try differencing it to the final commit of the previous PR. |
This is split off from #8217; part 3 of 3.
This should use #8256 as a base.