fix undefined signed shifts

The expression (1 << 31) is technically undefined.

Fixed the undefined shift referenced by this bug and
a few friends.

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

Review URL: https://codereview.chromium.org/1737363002
4 files changed