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

Side by Side Diff: src/core/SkPath.cpp

Issue 12699002: Upstream changes from Android. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: more fiex Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « src/core/SkPaint.cpp ('k') | src/core/SkScalerContext.h » ('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 #include "SkPath.h" 10 #include "SkPath.h"
(...skipping 1662 matching lines...) Expand 10 before | Expand all | Expand 10 after
1673 } 1673 }
1674 1674
1675 SkPathRef::CreateTransformedCopy(&dst->fPathRef, *fPathRef.get(), matrix ); 1675 SkPathRef::CreateTransformedCopy(&dst->fPathRef, *fPathRef.get(), matrix );
1676 1676
1677 if (this != dst) { 1677 if (this != dst) {
1678 dst->fFillType = fFillType; 1678 dst->fFillType = fFillType;
1679 dst->fSegmentMask = fSegmentMask; 1679 dst->fSegmentMask = fSegmentMask;
1680 dst->fConvexity = fConvexity; 1680 dst->fConvexity = fConvexity;
1681 } 1681 }
1682 1682
1683 #ifdef SK_BUILD_FOR_ANDROID
1684 if (!matrix.isIdentity()) {
1685 GEN_ID_PTR_INC(dst);
1686 }
1687 #endif
1688
1683 if (kUnknown_Direction == fDirection) { 1689 if (kUnknown_Direction == fDirection) {
1684 dst->fDirection = kUnknown_Direction; 1690 dst->fDirection = kUnknown_Direction;
1685 } else { 1691 } else {
1686 SkScalar det2x2 = 1692 SkScalar det2x2 =
1687 SkScalarMul(matrix.get(SkMatrix::kMScaleX), matrix.get(SkMatrix: :kMScaleY)) - 1693 SkScalarMul(matrix.get(SkMatrix::kMScaleX), matrix.get(SkMatrix: :kMScaleY)) -
1688 SkScalarMul(matrix.get(SkMatrix::kMSkewX), matrix.get(SkMatrix:: kMSkewY)); 1694 SkScalarMul(matrix.get(SkMatrix::kMSkewX), matrix.get(SkMatrix:: kMSkewY));
1689 if (det2x2 < 0) { 1695 if (det2x2 < 0) {
1690 dst->fDirection = SkPath::OppositeDirection(static_cast<Directio n>(fDirection)); 1696 dst->fDirection = SkPath::OppositeDirection(static_cast<Directio n>(fDirection));
1691 } else if (det2x2 > 0) { 1697 } else if (det2x2 > 0) {
1692 dst->fDirection = fDirection; 1698 dst->fDirection = fDirection;
(...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after
2945 switch (this->getFillType()) { 2951 switch (this->getFillType()) {
2946 case SkPath::kEvenOdd_FillType: 2952 case SkPath::kEvenOdd_FillType:
2947 case SkPath::kInverseEvenOdd_FillType: 2953 case SkPath::kInverseEvenOdd_FillType:
2948 w &= 1; 2954 w &= 1;
2949 break; 2955 break;
2950 default: 2956 default:
2951 break; 2957 break;
2952 } 2958 }
2953 return SkToBool(w); 2959 return SkToBool(w);
2954 } 2960 }
OLDNEW
« no previous file with comments | « src/core/SkPaint.cpp ('k') | src/core/SkScalerContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698