OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
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 "GrPathUtils.h" | 8 #include "GrPathUtils.h" |
9 | 9 |
10 #include "GrPoint.h" | 10 #include "GrTypes.h" |
11 #include "SkGeometry.h" | 11 #include "SkGeometry.h" |
12 | 12 |
13 SkScalar GrPathUtils::scaleToleranceToSrc(SkScalar devTol, | 13 SkScalar GrPathUtils::scaleToleranceToSrc(SkScalar devTol, |
14 const SkMatrix& viewM, | 14 const SkMatrix& viewM, |
15 const SkRect& pathBounds) { | 15 const SkRect& pathBounds) { |
16 // In order to tesselate the path we get a bound on how much the matrix can | 16 // In order to tesselate the path we get a bound on how much the matrix can |
17 // scale when mapping to screen coordinates. | 17 // scale when mapping to screen coordinates. |
18 SkScalar stretch = viewM.getMaxScale(); | 18 SkScalar stretch = viewM.getMaxScale(); |
19 SkScalar srcTol = devTol; | 19 SkScalar srcTol = devTol; |
20 | 20 |
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
859 set_loop_klm(d, controlK, controlL, controlM); | 859 set_loop_klm(d, controlK, controlL, controlM); |
860 } else if (kCusp_CubicType == cType) { | 860 } else if (kCusp_CubicType == cType) { |
861 SkASSERT(0.f == d[0]); | 861 SkASSERT(0.f == d[0]); |
862 set_cusp_klm(d, controlK, controlL, controlM); | 862 set_cusp_klm(d, controlK, controlL, controlM); |
863 } else if (kQuadratic_CubicType == cType) { | 863 } else if (kQuadratic_CubicType == cType) { |
864 set_quadratic_klm(d, controlK, controlL, controlM); | 864 set_quadratic_klm(d, controlK, controlL, controlM); |
865 } | 865 } |
866 | 866 |
867 calc_cubic_klm(p, controlK, controlL, controlM, klm, &klm[3], &klm[6]); | 867 calc_cubic_klm(p, controlK, controlL, controlM, klm, &klm[3], &klm[6]); |
868 } | 868 } |
OLD | NEW |