libs/hwui/PathTessellator.cpp
100644 → 100755
+6
−1
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
Symptom: In some cases like the distance between the calculating point is very
small, the recursion may not terminate.
If the calculated dx and dy are 0, d is 0 too. Then the termination
condition(d*d < TH*TH*(dx*dx*sq + dy*dy*sq)) will never be met.
Infinite recursion will cause stack-overflow.
Solution: We added one more threshold to terminate the recursion when d is very
small (possibly 0).
Change-Id: I7d27a72811109766766f8f8cc5d8d88e75db7f60