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

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

Issue 2471133002: Set analytic AA as default. (Closed)
Patch Set: One more catch Created 4 years, 1 month 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
OLDNEW
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 <cmath> 8 #include <cmath>
9 #include "SkBuffer.h" 9 #include "SkBuffer.h"
10 #include "SkCubicClipper.h" 10 #include "SkCubicClipper.h"
(...skipping 1724 matching lines...) Expand 10 before | Expand all | Expand 10 after
1735 dst->fFirstDirection = SkPathPriv::kUnknown_FirstDirection; 1735 dst->fFirstDirection = SkPathPriv::kUnknown_FirstDirection;
1736 } else { 1736 } else {
1737 SkPathRef::CreateTransformedCopy(&dst->fPathRef, *fPathRef.get(), matrix ); 1737 SkPathRef::CreateTransformedCopy(&dst->fPathRef, *fPathRef.get(), matrix );
1738 1738
1739 if (this != dst) { 1739 if (this != dst) {
1740 dst->fFillType = fFillType; 1740 dst->fFillType = fFillType;
1741 dst->fConvexity = fConvexity; 1741 dst->fConvexity = fConvexity;
1742 dst->fIsVolatile = fIsVolatile; 1742 dst->fIsVolatile = fIsVolatile;
1743 } 1743 }
1744 1744
1745 dst->fConvexity = SkPath::kUnknown_Convexity;
reed1 2016/11/07 15:31:42 If we're going to leave this in for real, please a
liyuqian 2016/11/07 16:08:00 Done.
1746
1745 if (SkPathPriv::kUnknown_FirstDirection == fFirstDirection) { 1747 if (SkPathPriv::kUnknown_FirstDirection == fFirstDirection) {
1746 dst->fFirstDirection = SkPathPriv::kUnknown_FirstDirection; 1748 dst->fFirstDirection = SkPathPriv::kUnknown_FirstDirection;
1747 } else { 1749 } else {
1748 SkScalar det2x2 = 1750 SkScalar det2x2 =
1749 SkScalarMul(matrix.get(SkMatrix::kMScaleX), matrix.get(SkMatrix: :kMScaleY)) - 1751 SkScalarMul(matrix.get(SkMatrix::kMScaleX), matrix.get(SkMatrix: :kMScaleY)) -
1750 SkScalarMul(matrix.get(SkMatrix::kMSkewX), matrix.get(SkMatrix:: kMSkewY)); 1752 SkScalarMul(matrix.get(SkMatrix::kMSkewX), matrix.get(SkMatrix:: kMSkewY));
1751 if (det2x2 < 0) { 1753 if (det2x2 < 0) {
1752 dst->fFirstDirection = SkPathPriv::OppositeFirstDirection( 1754 dst->fFirstDirection = SkPathPriv::OppositeFirstDirection(
1753 (SkPathPriv::FirstDirection)fFirstDirection.load()); 1755 (SkPathPriv::FirstDirection)fFirstDirection.load());
1754 } else if (det2x2 > 0) { 1756 } else if (det2x2 > 0) {
(...skipping 1636 matching lines...) Expand 10 before | Expand all | Expand 10 after
3391 path->arcTo(oval, startAngle, 180.f, false); 3393 path->arcTo(oval, startAngle, 180.f, false);
3392 startAngle += 180.f; 3394 startAngle += 180.f;
3393 forceMoveTo = false; 3395 forceMoveTo = false;
3394 sweepAngle -= 360.f; 3396 sweepAngle -= 360.f;
3395 } 3397 }
3396 path->arcTo(oval, startAngle, sweepAngle, forceMoveTo); 3398 path->arcTo(oval, startAngle, sweepAngle, forceMoveTo);
3397 if (useCenter) { 3399 if (useCenter) {
3398 path->close(); 3400 path->close();
3399 } 3401 }
3400 } 3402 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698