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

Side by Side Diff: include/core/SkMatrix.h

Issue 1228473004: Fix up SkMatrix::isFinite call (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/core/SkMatrix.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkMatrix_DEFINED 10 #ifndef SkMatrix_DEFINED
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 kAffine_Mask | 718 kAffine_Mask |
719 kPerspective_Mask | 719 kPerspective_Mask |
720 kRectStaysRect_Mask 720 kRectStaysRect_Mask
721 }; 721 };
722 722
723 SkScalar fMat[9]; 723 SkScalar fMat[9];
724 mutable uint32_t fTypeMask; 724 mutable uint32_t fTypeMask;
725 725
726 /** Are all elements of the matrix finite? 726 /** Are all elements of the matrix finite?
727 */ 727 */
728 bool isFinite() const; 728 bool isFinite() const { return SkScalarsAreFinite(fMat, 9); }
729 729
730 static void ComputeInv(SkScalar dst[9], const SkScalar src[9], double invDet , bool isPersp); 730 static void ComputeInv(SkScalar dst[9], const SkScalar src[9], double invDet , bool isPersp);
731 731
732 void setScaleTranslate(SkScalar sx, SkScalar sy, SkScalar tx, SkScalar ty) { 732 void setScaleTranslate(SkScalar sx, SkScalar sy, SkScalar tx, SkScalar ty) {
733 fMat[kMScaleX] = sx; 733 fMat[kMScaleX] = sx;
734 fMat[kMSkewX] = 0; 734 fMat[kMSkewX] = 0;
735 fMat[kMTransX] = tx; 735 fMat[kMTransX] = tx;
736 736
737 fMat[kMSkewY] = 0; 737 fMat[kMSkewY] = 0;
738 fMat[kMScaleY] = sy; 738 fMat[kMScaleY] = sy;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 static void Persp_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], int); 816 static void Persp_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], int);
817 817
818 static void Affine_vpts(const SkMatrix&, SkPoint dst[], const SkPoint[], int ); 818 static void Affine_vpts(const SkMatrix&, SkPoint dst[], const SkPoint[], int );
819 819
820 static const MapPtsProc gMapPtsProcs[]; 820 static const MapPtsProc gMapPtsProcs[];
821 821
822 friend class SkPerspIter; 822 friend class SkPerspIter;
823 }; 823 };
824 824
825 #endif 825 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkMatrix.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698