diff options
author | mtklein <mtklein@chromium.org> | 2015-08-27 12:05:56 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-27 12:05:57 -0700 |
commit | 6904d1d3f1a2903fcaa4c4bd17b07d5f10af2e8e (patch) | |
tree | 01123ae4f6ed73f616f1c0b3f10bf5d70b157d37 /src/core | |
parent | e01008fdbccf64eb17f9efe243afdf7aa3f5bd1d (diff) |
Add a note about (x*y+255)/256.
BUG=skia:4117
Review URL: https://codereview.chromium.org/1312283004
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/Sk4px.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/Sk4px.h b/src/core/Sk4px.h index 996847fa12..a7f5c9f4c6 100644 --- a/src/core/Sk4px.h +++ b/src/core/Sk4px.h @@ -103,6 +103,7 @@ public: // May be incorrect by +-1, but is always exactly correct when *this or o is 0 or 255. Sk4px approxMulDiv255(const Sk16b& o) const { // (x*y + x) / 256 meets these criteria. (As of course does (x*y + y) / 256 by symmetry.) + // FYI: (x*y + 255) / 256 also meets these criteria. In my brief testing, it was slower. return this->widenLo().addNarrowHi(*this * o); } |