Cache Images downloaded from the web#48
Open
Kulltero wants to merge 4 commits intoFacepunch:masterfrom
Open
Conversation
Avoids Re-downloading the same image for following instances of the same image, re-using the texture instead (Also Removing a now-useless if check, since it *shouldnt* happen and would only confuse anyone if it did, this was left from my change to prevent mipmap issues)
slight syntax fix
Added A Request Queue to avoid cases where multiple images load the same url if they get created before the first image is cached, instead the components get added to a queue and then applied at the end
4 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Avoids Re-downloading the same image for following instances of the same image, re-using the texture instead, doesnt persist through restarts
(Also Removing a now-useless if check, since it shouldnt happen and would only confuse anyone if it did, this was left from my change to prevent mipmap issues)
i chose not to use the CachedTexture system added in a recent commit, because sprites cant currently be loaded from the web & there didnt seem to be a trivial way to get the CRC just from the url, feel free to change it over if desired 👍