impeller::Matrix::GetScale() returns a specific value that is not well telegraphed
- Dominant language
- Dart
- Stars
- 179k
- Forks
- 31.1k
- PR merge metrics
- PR metrics pending
Description
First, the method has a name which sounds like it is returning some generalized scale value (albeit separately for each axis), but it is returning specifically the length of the 3 transformed basis vectors. That value might be interesting for some cases, but it should be named to indicate that operation rather than generically as `GetScale()`. Computing some kind of overall scale of 2D coordinates requires more complex calculations such as are (soon) being done in `GetMaxScale2D()` or `GetMinScale2D()`.
The method is only used in one location in the impeller dispatcher:
https://github.com/flutter/flutter/blob/afba7d75b391a6b8015a2e437d74cf0f55036606/engine/src/flutter/impeller/display_list/dl_dispatcher.cc#L926
It's not clear what is the best value to use in that case, but the length of the Y basis vector doesn't seem right.
Contributor guide
Assessment
This issue has not been assessed yet.