diff options
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 9af8eeba14a0..b5a33afccdc7 100644 --- a/libs/hwui/Interpolator.cpp +++ b/libs/hwui/Interpolator.cpp @@ -98,7 +98,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]; } |