Descriptiongfx: Fix ToEnclosing/ToEnclosed math to deal with big numbers.
This match ensures that ToEnclosingRect and ToEnclosedRect deal
better with extreme values. In particular, width and height
calculations exhibited undefined behavior with signed integer
overflow. This was fixed by first promoting the operands to float
and then safely truncating the result to int.
R=danakj
Committed: https://crrev.com/03aa528c7796e123655a04c1d3bc3f9a75453ddd
Cr-Commit-Position: refs/heads/master@{#334487}
Patch Set 1 #Patch Set 2 : move function #
Total comments: 2
Patch Set 3 : update #Patch Set 4 : #
Messages
Total messages: 17 (4 generated)
|