diff options
author | mtklein <mtklein@chromium.org> | 2015-06-15 10:58:42 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-15 10:58:43 -0700 |
commit | 374787534147f3a616925d297bce74ff575d8911 (patch) | |
tree | a3e1ce1731866c0abefd46b97112f40b925b366c /src | |
parent | 07a8fc827b8665a8c2966d5a264ba4901bef9443 (diff) |
Thorough tests for saturatedAdd and mulDiv255Round.
BUG=skia:3951
Committed: https://skia.googlesource.com/skia/+/ce9d11189a5924b47c3629063b72bae9d466c2c7
CQ_EXTRA_TRYBOTS=client.skia.android:Test-Android-GCC-Nexus5-CPU-NEON-Arm7-Release-Trybot
Review URL: https://codereview.chromium.org/1184113003
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkNx.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/SkNx.h b/src/core/SkNx.h index d968cad19f..1342266b93 100644 --- a/src/core/SkNx.h +++ b/src/core/SkNx.h @@ -184,7 +184,7 @@ public: SkNi saturatedAdd(const SkNi& o) const { SkASSERT((T)(~0) > 0); // TODO: support signed T T sum = fVal + o.fVal; - return SkNi(sum > fVal ? sum : (T)(~0)); + return SkNi(sum < fVal ? (T)(~0) : sum); } SkNi operator + (const SkNi& o) const { return SkNi(fVal + o.fVal); } |