That's confusing. Make it clear we're working with 3 points == 9 scalars.

BUG=skia:
R=reed@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/148383009

git-svn-id: http://skia.googlecode.com/svn/trunk@13216 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
commit-bot@chromium.org 2014-01-28 14:36:52 +00:00
parent f296eac872
commit d50d87a185

View File

@ -1336,9 +1336,8 @@ struct SkP3D {
}
};
// we just return the middle 3 points, since the first and last are dups of src
//
static void p3d_interp(const SkScalar src[3], SkScalar dst[3], SkScalar t) {
// We only interpolate one dimension at a time (the first, at +0, +3, +6).
static void p3d_interp(const SkScalar src[7], SkScalar dst[7], SkScalar t) {
SkScalar ab = SkScalarInterp(src[0], src[3], t);
SkScalar bc = SkScalarInterp(src[3], src[6], t);
dst[0] = ab;