flutter / flutter/flutter

impeller::Matrix::GetScale() returns a specific value that is not well telegraphed

Open
#172,611 0 comments 0 reactions 0 assignees View on GitHub
e: impeller engine P2 team-engine triaged-engine
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.