Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Unified Diff: src/core/SkMatrixUtils.h

Issue 23596006: Revise SVD code to remove arctangents. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fix matrix_decompose bench to actually check random matrices. Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkMatrix.cpp ('k') | tests/Matrix44Test.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkMatrixUtils.h
diff --git a/src/core/SkMatrixUtils.h b/src/core/SkMatrixUtils.h
index 37341f289e5bba4d73d695016d4839d497448069..3fc1440e15ea7a7683f0a1cbd8390b083e9bbcfb 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
« no previous file with comments | « src/core/SkMatrix.cpp ('k') | tests/Matrix44Test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698