paint: fastTrack should return false for the skew transformations

This commit is contained in:
Mira Grudzinska 2022-12-27 18:32:43 +01:00 committed by Hermet Park
parent eff6b3aa6a
commit 12056d516f
2 changed files with 9 additions and 3 deletions

View file

@ -53,6 +53,12 @@ static inline bool mathRightAngle(const Matrix* m)
}
static inline bool mathSkewed(const Matrix* m)
{
return (fabsf(m->e21 + m->e12) > FLT_EPSILON);
}
static inline bool mathIdentity(const Matrix* m)
{
if (!mathEqual(m->e11, 1.0f) || !mathZero(m->e12) || !mathZero(m->e13) ||

View file

@ -38,9 +38,9 @@ static bool _compFastTrack(Paint* cmpTarget, const RenderTransform* pTransform,
if (rTransform) rTransform->update();
//No rotational.
if (pTransform && !mathRightAngle(&pTransform->m)) return false;
if (rTransform && !mathRightAngle(&rTransform->m)) return false;
//No rotation and no skewing
if (pTransform && (!mathRightAngle(&pTransform->m) || mathSkewed(&pTransform->m))) return false;
if (rTransform && (!mathRightAngle(&rTransform->m) || mathSkewed(&rTransform->m))) return false;
//Perpendicular Rectangle?
auto pt1 = pts + 0;