diff options
author | Greg Daniel <egdaniel@google.com> | 2017-03-14 10:20:24 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-03-14 17:40:56 +0000 |
commit | 8199d94c0812a05320064f5f864b4208ffb25dba (patch) | |
tree | 2bc531a8ca3e1dce9da501b8eb8b11b0b74ae749 /src/gpu/GrPathUtils.h | |
parent | 97eb4feb112967ba7fcb00d6995adda1002873c2 (diff) |
Generaly Fixes to gpu bezier code
BUG=skia:
Change-Id: I2246aa0b2bc3327df42ca30d35020a4b878a819b
Reviewed-on: https://skia-review.googlesource.com/9555
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'src/gpu/GrPathUtils.h')
-rw-r--r-- | src/gpu/GrPathUtils.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gpu/GrPathUtils.h b/src/gpu/GrPathUtils.h index fcc32c89c4..8b844180b7 100644 --- a/src/gpu/GrPathUtils.h +++ b/src/gpu/GrPathUtils.h @@ -146,16 +146,16 @@ namespace GrPathUtils { // K = (klm[0], klm[1], klm[2]) // L = (klm[3], klm[4], klm[5]) // M = (klm[6], klm[7], klm[8]) - // klm_rev: These values are flags for the corresponding sub cubic saying whether or not - // the K and L values need to be flipped. A value of -1.f means flip K and L and - // a value of 1.f means do nothing. - // *****DO NOT FLIP M, JUST K AND L***** + // loopIndex: This value will tell the caller which of the chopped sections are the the actual + // loop once we've chopped. A value of -1 means there is no loop section. The caller + // can then use this value to decide how/if they want to flip the orientation of this + // section. This flip should be done by negating the K and L values. // // Notice that the klm lines are calculated in the same space as the input control points. // If you transform the points the lines will also need to be transformed. This can be done // by mapping the lines with the inverse-transpose of the matrix used to map the points. int chopCubicAtLoopIntersection(const SkPoint src[4], SkPoint dst[10] = nullptr, - SkScalar klm[9] = nullptr, SkScalar klm_rev[3] = nullptr); + SkScalar klm[9] = nullptr, int* loopIndex = nullptr); // Input is p which holds the 4 control points of a non-rational cubic Bezier curve. // Output is the coefficients of the three linear functionals K, L, & M which |