Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More efficient decoding for down-sampled Flutter images using cache(W…
…idth|Height) (#15372) When down-scaling images, decode encoded images into smaller images closer to the target size before finally down-scaling them to their target size. For very large images this can avoid inflating the image into its full size first before throwing it away. This can help to significantly reduce peak memory utilization. On a tangent, we could be even more efficient, if we'd interpret the cache(Width|Height) as sizing hints. I also opportunistically added warnings, I don't think a "caching" API should support scaling images up or changing their aspect ratio.
- Loading branch information
Showing
6 changed files
with
169 additions
and
28 deletions.
There are no files selected for viewing
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
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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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