This repository was archived by the owner on Feb 25, 2025. It is now read-only.
[Impeller] ensure 1x1 has mipcount of 1#39182
Merged
auto-submit[bot] merged 3 commits intoflutter:mainfrom Jan 27, 2023
Merged
Conversation
Contributor
Author
|
actually I think I might be misunderstanding this API, certainly asking for a mipcount of 0 is invalid - but does mipcount of 1 mean no mipping mapping? |
Contributor
|
Yeah, 1 just means no mipmapping. |
chinmaygarde
approved these changes
Jan 27, 2023
Contributor
chinmaygarde
left a comment
There was a problem hiding this comment.
Some nits but lgtm otherwise.
impeller/geometry/size.h
Outdated
| return 1u; | ||
| } | ||
| return std::max(ceil(log2(width)), ceil(log2(height))); | ||
| constexpr size_t minimumMip = 1u; |
| ASSERT_EQ((Size{128, 0}.MipCount()), 1u); | ||
| ASSERT_EQ((Size{128, -25}.MipCount()), 1u); | ||
| ASSERT_EQ((Size{-128, 25}.MipCount()), 1u); | ||
| ASSERT_EQ((Size{1, 1}.MipCount()), 1u); |
Contributor
There was a problem hiding this comment.
Mip counts should always at least be 1. Perhaps also check Size{0, 0}?
added 2 commits
January 26, 2023 18:51
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jan 27, 2023
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jan 27, 2023
auto-submit bot
pushed a commit
to flutter/flutter
that referenced
this pull request
Jan 27, 2023
* 6a92731 [Impeller] ensure 1x1 has mipcount of 1 (flutter/engine#39182) * 55f7a09 Roll Fuchsia Linux SDK from kdjOCYzDtnfY30985... to 6c2H32X3EXOGlWIgb... (flutter/engine#39193) * 621e13c Roll Dart SDK from dcdd3fbb3116 to 2cd9b7ac95e8 (2 revisions) (flutter/engine#39185)
zanderso
pushed a commit
to zanderso/engine
that referenced
this pull request
Feb 3, 2023
* [Impeller] ensure 1x1 has mipcount of 1 * Update geometry_unittests.cc * Update size.h
godofredoc
pushed a commit
that referenced
this pull request
Feb 4, 2023
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.
Fixes flutter/flutter#119245
Before mipcount of 1x1 image would be 0, resulting in invalid texture