| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkMatrix.h" | 8 #include "SkMatrix.h" |
| 9 #include "SkFloatBits.h" | 9 #include "SkFloatBits.h" |
| 10 #include "SkString.h" | 10 #include "SkString.h" |
| (...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 affine[kAScaleX] = this->fMat[kMScaleX]; | 779 affine[kAScaleX] = this->fMat[kMScaleX]; |
| 780 affine[kASkewY] = this->fMat[kMSkewY]; | 780 affine[kASkewY] = this->fMat[kMSkewY]; |
| 781 affine[kASkewX] = this->fMat[kMSkewX]; | 781 affine[kASkewX] = this->fMat[kMSkewX]; |
| 782 affine[kAScaleY] = this->fMat[kMScaleY]; | 782 affine[kAScaleY] = this->fMat[kMScaleY]; |
| 783 affine[kATransX] = this->fMat[kMTransX]; | 783 affine[kATransX] = this->fMat[kMTransX]; |
| 784 affine[kATransY] = this->fMat[kMTransY]; | 784 affine[kATransY] = this->fMat[kMTransY]; |
| 785 } | 785 } |
| 786 return true; | 786 return true; |
| 787 } | 787 } |
| 788 | 788 |
| 789 void SkMatrix::ComputeInv(SkScalar dst[9], const SkScalar src[9], SkScalar invDe
t, bool isPersp) { | 789 void SkMatrix::ComputeInv(SkScalar dst[9], const SkScalar src[9], double invDet,
bool isPersp) { |
| 790 SkASSERT(src != dst); | 790 SkASSERT(src != dst); |
| 791 SkASSERT(src && dst); | 791 SkASSERT(src && dst); |
| 792 | 792 |
| 793 if (isPersp) { | 793 if (isPersp) { |
| 794 dst[kMScaleX] = scross_dscale(src[kMScaleY], src[kMPersp2], src[kMTransY
], src[kMPersp1], invDet); | 794 dst[kMScaleX] = scross_dscale(src[kMScaleY], src[kMPersp2], src[kMTransY
], src[kMPersp1], invDet); |
| 795 dst[kMSkewX] = scross_dscale(src[kMTransX], src[kMPersp1], src[kMSkewX]
, src[kMPersp2], invDet); | 795 dst[kMSkewX] = scross_dscale(src[kMTransX], src[kMPersp1], src[kMSkewX]
, src[kMPersp2], invDet); |
| 796 dst[kMTransX] = scross_dscale(src[kMSkewX], src[kMTransY], src[kMTransX
], src[kMScaleY], invDet); | 796 dst[kMTransX] = scross_dscale(src[kMSkewX], src[kMTransY], src[kMTransX
], src[kMScaleY], invDet); |
| 797 | 797 |
| 798 dst[kMSkewY] = scross_dscale(src[kMTransY], src[kMPersp0], src[kMSkewY]
, src[kMPersp2], invDet); | 798 dst[kMSkewY] = scross_dscale(src[kMTransY], src[kMPersp0], src[kMSkewY]
, src[kMPersp2], invDet); |
| 799 dst[kMScaleY] = scross_dscale(src[kMScaleX], src[kMPersp2], src[kMTransX
], src[kMPersp0], invDet); | 799 dst[kMScaleY] = scross_dscale(src[kMScaleX], src[kMPersp2], src[kMTransX
], src[kMPersp0], invDet); |
| (...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1816 rotation1->fX = cos1; | 1816 rotation1->fX = cos1; |
| 1817 rotation1->fY = sin1; | 1817 rotation1->fY = sin1; |
| 1818 } | 1818 } |
| 1819 if (rotation2) { | 1819 if (rotation2) { |
| 1820 rotation2->fX = cos2; | 1820 rotation2->fX = cos2; |
| 1821 rotation2->fY = sin2; | 1821 rotation2->fY = sin2; |
| 1822 } | 1822 } |
| 1823 | 1823 |
| 1824 return true; | 1824 return true; |
| 1825 } | 1825 } |
| OLD | NEW |