Skip to content
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

Closed

Conversation

techgeeknz
Copy link
Contributor

This is split off from #8217; part 3 of 3.
This should use #8256 as a base.

JGRennison and others added 26 commits July 2, 2020 19:13
This will need fixups, because the commit checker won't let me indent
a nested #define.
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.
@LordAro
Copy link
Member

LordAro commented Jul 2, 2020

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.

@techgeeknz
Copy link
Contributor Author

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.

So the renaming of ViewPort is definitely something that you want; and you want it done first? Okay, I can do that.
I'd had it set up so that would happen last, making it easier to skip if it turned out to be an undesirable change.

@techgeeknz
Copy link
Contributor Author

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.

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 master; because they build upon each other. How else would you go about setting up large changes like this?

@techgeeknz techgeeknz closed this Jul 2, 2020
@LordAro
Copy link
Member

LordAro commented Jul 2, 2020

I want this PR to deal with renaming ViewPort and only renaming ViewPort. None of the other changes.

@techgeeknz
Copy link
Contributor Author

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.

@techgeeknz techgeeknz deleted the jgr_master_gui_doc_viewport branch July 22, 2020 06:44
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.

None yet

3 participants