Wire decodedCacheRatioCap from ImageCache to Codec#22452
Merged
mklim merged 2 commits intoflutter:masterfrom Oct 15, 2018
mklim:gif_decode_limit
Merged
Wire decodedCacheRatioCap from ImageCache to Codec#22452mklim merged 2 commits intoflutter:masterfrom mklim:gif_decode_limit
mklim merged 2 commits intoflutter:masterfrom
mklim:gif_decode_limit
Conversation
mklim
commented
Sep 28, 2018
Hixie
reviewed
Oct 6, 2018
Hixie
reviewed
Oct 6, 2018
Hixie
reviewed
Oct 6, 2018
Contributor
There was a problem hiding this comment.
you dropped the await on this one
Hixie
reviewed
Oct 6, 2018
Contributor
There was a problem hiding this comment.
you could add a test that the various image providers end up calling into the binding (rather than calling dart:ui directly) by creating your own subclass of the binding in the test. there should be some existing tests you can crib from that do similar things.
Contributor
There was a problem hiding this comment.
(or if you put the method on the image cache, you just need to override the image cache)
mklim
pushed a commit
to flutter/engine
that referenced
this pull request
Oct 10, 2018
Provide a relative, per-image limit to the amount of memory that's used to cache decoded image frames. Adds an overridable default that developers can set to control how much memory images are allowed to use decoded vs undecoded. The cap is set in flutter/flutter#22452. Note that required frames are always cached regardless of the ratio cap, because they're currently necessary for the GIF to animate. Previously cached unessential frames are not cleared in response to the cache hitting or exceeding the cap. Addresses #20998 and #14344.
added 2 commits
October 11, 2018 10:12
Users can set `ImageCache.decodedCacheRatioCap` to control the max amount of memory used per image to avoid decoding frames each animation loop. This depends on flutter/engine#6310.
Contributor
Author
|
This is ready to merge now, the engine dependency has been rolled into the framework. |
Contributor
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Users can set
ImageCache.decodedCacheRatioCapto control the maxamount of memory used per image to avoid decoding frames each animation
loop.
This depends on flutter/engine#6310.
Fixes #20998, and fixes #14344