clamp fixed divide to 32 bits
authorcaryclark <caryclark@google.com>
Tue, 12 Jan 2016 15:21:19 +0000 (07:21 -0800)
committerCommit bot <commit-bot@chromium.org>
Tue, 12 Jan 2016 15:21:19 +0000 (07:21 -0800)
commitc63a0f8fe534eef8d52abc2066126729be9b497c
tree2f9e298931408e516e2f421e7bc785304f555e25
parent32cdc32522bf39a8236880f57ff4ee5b26bdd363
clamp fixed divide to 32 bits

In SkEdge::setLine, the numerator is a 26.6 fixed number.
SkFixedDiv shifts it up by an additional 16 bits. If the
y interval is small, the result overflows 32 bits.

The code pins in 64 bit space before down-casting the result.

R=reed@google.com
BUG=skia:4708
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1583453002

Review URL: https://codereview.chromium.org/1583453002
include/core/SkFixed.h