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
[no squash] Extract image generation/cache from texturesource.cpp and some refactoring #14446
Merged
Conversation
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
wsor4035
added
Maintenance
Tasks to keep the codebase and related parts in order, including architectural improvements
Code quality
labels
Mar 8, 2024
sfan5
reviewed
Mar 10, 2024
sfan5
reviewed
Mar 10, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forgot to review the second commit
cx384
force-pushed
the
refactor_texturesource
branch
from
March 17, 2024 14:05
5cf6d90
to
f63719f
Compare
Thanks for the review, I resolved everything and rebased. It is ready for review again. |
sfan5
approved these changes
Mar 17, 2024
sfan5
added
One approval ✅ ◻️
and removed
Rebase needed
The PR needs to be rebased by its author.
labels
Mar 17, 2024
cx384
force-pushed
the
refactor_texturesource
branch
from
March 19, 2024 20:56
f63719f
to
344a46f
Compare
Rebased to include the changes which #14448 made. |
grorp
approved these changes
Mar 29, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Code quality
Maintenance
Tasks to keep the codebase and related parts in order, including architectural improvements
Roadmap
The change matches an item on the current roadmap.
>= Two approvals ✅ ✅
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.
Goal of the PR
texturesource.cpp
such that it only handles texture storage, and no source image caching or applying of texture modifiers.How does the PR work?
imagesource.h/cpp
texturesource.cpp
, andimagesource.cpp
doesn't need any mutex.texturesource.cpp
gets refactored, but it's mostly modernizing and formatting, so there shouldn't be much behavioral difference.SourceImageCache
does also get refactored a little bit, but the rest ofimagesource.cpp
stays the same, since it would be too much for this PR to also reactor it.IImage
is an image object, which can be modified.IImage
loaded from a texture file without any modification.ITexture
is made from anIImage
for the driver to use. It doesn't get modified.Does this relate to a goal in the roadmap?
2.2 Internal code refactoring
To do
This PR is Ready for Review.
(The next step is to refactor
imagesource.cpp
.)(In the future, it may be good to replace const string reverences by string views everywhere, but this would involve changing many files.)
How to test
imagesource.cpp
didn't change.(e.g. use
git diff --color-moved <commit1> <commit2>
)