diff options
author | skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-09-04 07:01:39 +0000 |
---|---|---|
committer | skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-09-04 07:01:39 +0000 |
commit | 85092f05c406ed5a0c65ff576816924c1a6b903b (patch) | |
tree | fdd05be111e530208ad7f3e6dbf43bdc189f8303 /src/core | |
parent | 5651512aa31422bdf234efc8341a9673592b18d3 (diff) |
Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@11071 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkMatrix.cpp | 8 | ||||
-rw-r--r-- | src/core/SkMatrixUtils.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/core/SkMatrix.cpp b/src/core/SkMatrix.cpp index 263b2efe36..ff24ecfb03 100644 --- a/src/core/SkMatrix.cpp +++ b/src/core/SkMatrix.cpp @@ -2068,7 +2068,7 @@ bool SkDecomposeUpper2x2(const SkMatrix& matrix, w2 = Sd; cos2 = cosQ; sin2 = sinQ; - } else { + } else { double diff = Sa - Sd; double discriminant = sqrt(diff*diff + 4.0*Sb*Sb); double trace = Sa + Sd; @@ -2079,16 +2079,16 @@ bool SkDecomposeUpper2x2(const SkMatrix& matrix, w1 = 0.5*(trace - discriminant); w2 = 0.5*(trace + discriminant); } - + cos1 = SkDoubleToScalar(Sb); sin1 = SkDoubleToScalar(w1 - Sa); SkScalar reciplen = SK_Scalar1/SkScalarSqrt(cos1*cos1 + sin1*sin1); cos1 *= reciplen; sin1 *= reciplen; - + // rotation 2 is composition of Q and U cos2 = cos1*cosQ - sin1*sinQ; sin2 = sin1*cosQ + cos1*sinQ; - + // rotation 1 is U^T sin1 = -sin1; } diff --git a/src/core/SkMatrixUtils.h b/src/core/SkMatrixUtils.h index 3fc1440e15..d1b6658d07 100644 --- a/src/core/SkMatrixUtils.h +++ b/src/core/SkMatrixUtils.h @@ -42,7 +42,7 @@ static inline bool SkTreatAsSpriteFilter(const SkMatrix& matrix, /** 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 + 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. */ |