diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-09-03 19:08:14 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-09-03 19:08:14 +0000 |
commit | 5b2e2640ed345c4670b99b349f62eb6f9446ec1e (patch) | |
tree | eafdb483c2d8f87ddffe03e2255d2fec03f31dd5 /src/core/SkMatrixUtils.h | |
parent | e2b103fba2bf631a81875e33a28fb9a0c70acc34 (diff) |
Revise SVD code to remove arctangents.
Also added bench for timing matrix decomposition.
R=reed@google.com
Author: jvanverth@google.com
Review URL: https://chromiumcodereview.appspot.com/23596006
git-svn-id: http://skia.googlecode.com/svn/trunk@11066 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkMatrixUtils.h')
-rw-r--r-- | src/core/SkMatrixUtils.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/SkMatrixUtils.h b/src/core/SkMatrixUtils.h index 37341f289e..3fc1440e15 100644 --- a/src/core/SkMatrixUtils.h +++ b/src/core/SkMatrixUtils.h @@ -40,15 +40,15 @@ static inline bool SkTreatAsSpriteFilter(const SkMatrix& matrix, return SkTreatAsSprite(matrix, width, height, kSkSubPixelBitsForBilerp); } -/** Decomposes the upper-left 2x2 of the matrix into a rotation, followed by a non-uniform scale, - followed by another rotation. Returns true if successful. - If the scale factors are uniform, then rotation1 will be 0. - If there is a reflection, yScale will be negative. - Returns false if the matrix is degenerate. +/** Decomposes the upper-left 2x2 of the matrix into a rotation (represented by + the cosine and sine of the rotation angle), followed by a non-uniform scale, + followed by another rotation. If there is a reflection, one of the scale + factors will be negative. + Returns true if successful. Returns false if the matrix is degenerate. */ bool SkDecomposeUpper2x2(const SkMatrix& matrix, - SkScalar* rotation0, - SkScalar* xScale, SkScalar* yScale, - SkScalar* rotation1); + SkPoint* rotation1, + SkPoint* scale, + SkPoint* rotation2); #endif |