diff options
author | Doris Liu <tianliu@google.com> | 2016-11-29 13:04:49 -0800 |
---|---|---|
committer | Doris Liu <tianliu@google.com> | 2016-11-30 23:20:19 +0000 |
commit | 0940834c8cc024985f20bbdd19fb32c73ccb25f2 (patch) | |
tree | 714883399f7361cceb6fa3a328110292240d713b /libs/hwui/Interpolator.cpp | |
parent | 7efd37e9539ee3139c9c02ee29768c51a41afcd5 (diff) |
Fix LUTInterpolator lookup table position calc
BUG: 32830741
Test: running progress bar at 5x duration scale, no flickering
Change-Id: Ie484bdbfdf18bacc4586e36c5142e4523d08bdaa
Diffstat (limited to 'libs/hwui/Interpolator.cpp')
-rw-r--r-- | libs/hwui/Interpolator.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/hwui/Interpolator.cpp b/libs/hwui/Interpolator.cpp index cc47f0052b73..bddb01b97865 100644 --- a/libs/hwui/Interpolator.cpp +++ b/libs/hwui/Interpolator.cpp @@ -97,7 +97,8 @@ LUTInterpolator::~LUTInterpolator() { } float LUTInterpolator::interpolate(float input) { - float lutpos = input * mSize; + // lut position should only be at the end of the table when input is 1f. + float lutpos = input * (mSize - 1); if (lutpos >= (mSize - 1)) { return mValues[mSize - 1]; } |