commit | 35ae65d5d04dc3fc75a635c90c5aa9bb1eda3812 | [log] [tgz] |
---|---|---|
author | Herb Derby <herb@google.com> | Fri Aug 11 14:00:50 2017 -0400 |
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | Fri Aug 11 19:23:06 2017 +0000 |
tree | 185d330eee186be755e9f32ae67cddc7b055783d | |
parent | 4a31c46006d297b6230a72d1f7bbadb0ca6df429 [diff] |
SkSafeMath for tracking size_t overflow Do multiply (mul) and add while tracking that the calculation does not overflow, which can be checked with ok(). The new unit test shows a couple examples. Author: Herb Derby <herb@google.com> Change-Id: I7e67671d2488d67f21d47d9618736a6bae8f23c3 Reviewed-on: https://skia-review.googlesource.com/33721 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Herb Derby <herb@google.com>