feat!: Remove integralSize property from class Svg, enforcing 'always true' behaviour#3969
Open
adario wants to merge 1 commit into
Open
feat!: Remove integralSize property from class Svg, enforcing 'always true' behaviour#3969adario wants to merge 1 commit into
adario wants to merge 1 commit into
Conversation
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.
Description
The
Svg.integralSizeproperty was added in PR #3956: whentrue, it ensures that the keys forSvg._imageCacheare always integer-sized. The property, however, would never be useful with its current default offalse, since this would re-introduce floating-point rounding errors in the image cache keys.Resolution
Remove the
integralSizeproperty, always following itstruecodepath.Testing
An updated testbed for the changes is available — this displays 200+1 SvgComponent objects, all with different rotation/scale values; it now features the Svg button, which cycles through a few SVG assets.
For comparison purposes, the testbed starts with the default implementation; the Mode and Size buttons cycle through several combinations of the
fixedRatioandcacheSizeproperties..Checklist
docsand added dartdoc comments with///.examplesordocs.Breaking Change?
Migration instructions
This PR does change the internal caching behaviour in class
Svg, for all rendering operations. However, any existing use cases of classSvgshould build as previously , since the property changes from PR #3956 haven't been published yet. All parameters/properties from PR #3956 have default values, so no build should break.At runtime, the PR should not break class
Svgclients either: the actualImageobjects in theMemoryCacheshould maintain the previous dimensions and contents, since these were already integral prior to PR #3956. A 3-way comparison for themelos test --scope=flame_svgresults reveals no differences (all tests fail in the same way)...I apologise if I've missed something, but at present I wouldn't know what migration steps to provide.
Related Issues