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/pathops/SkOpAngle.cpp

Issue 1313203003: Remove include of stdlib.h from SkTypes.h. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Clean up qsort conversion. Created 5 years, 3 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 | « src/core/SkTime.cpp ('k') | src/pathops/SkOpSegment.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 * Copyright 2012 Google Inc. 2 * Copyright 2012 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 #include "SkOpAngle.h" 7 #include "SkOpAngle.h"
8 #include "SkOpSegment.h" 8 #include "SkOpSegment.h"
9 #include "SkPathOpsCurve.h" 9 #include "SkPathOpsCurve.h"
10 #include "SkTSort.h" 10 #include "SkTSort.h"
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 SkDVector oppSide = oppMid.pt(oppOutside) - dStartPt; 802 SkDVector oppSide = oppMid.pt(oppOutside) - dStartPt;
803 double dir = iSide.crossCheck(oppSide); 803 double dir = iSide.crossCheck(oppSide);
804 if (!dir) { 804 if (!dir) {
805 return false; 805 return false;
806 } 806 }
807 *inside = dir < 0; 807 *inside = dir < 0;
808 return true; 808 return true;
809 } 809 }
810 810
811 bool SkOpAngle::oppositePlanes(const SkOpAngle* rh) const { 811 bool SkOpAngle::oppositePlanes(const SkOpAngle* rh) const {
812 int startSpan = abs(rh->fSectorStart - fSectorStart); 812 int startSpan = SkTAbs(rh->fSectorStart - fSectorStart);
813 return startSpan >= 8; 813 return startSpan >= 8;
814 } 814 }
815 815
816 bool SkOpAngle::orderable(SkOpAngle* rh) { 816 bool SkOpAngle::orderable(SkOpAngle* rh) {
817 int result; 817 int result;
818 if (!fIsCurve) { 818 if (!fIsCurve) {
819 if (!rh->fIsCurve) { 819 if (!rh->fIsCurve) {
820 double leftX = fTangentHalf.dx(); 820 double leftX = fTangentHalf.dx();
821 double leftY = fTangentHalf.dy(); 821 double leftY = fTangentHalf.dy();
822 double rightX = rh->fTangentHalf.dx(); 822 double rightX = rh->fTangentHalf.dx();
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
1091 return true; 1091 return true;
1092 } 1092 }
1093 SkASSERT(s0dt0 != 0); 1093 SkASSERT(s0dt0 != 0);
1094 double m = s0xt0 / s0dt0; 1094 double m = s0xt0 / s0dt0;
1095 double sDist = sweep[0].length() * m; 1095 double sDist = sweep[0].length() * m;
1096 double tDist = tweep[0].length() * m; 1096 double tDist = tweep[0].length() * m;
1097 bool useS = fabs(sDist) < fabs(tDist); 1097 bool useS = fabs(sDist) < fabs(tDist);
1098 double mFactor = fabs(useS ? this->distEndRatio(sDist) : rh->distEndRatio(tD ist)); 1098 double mFactor = fabs(useS ? this->distEndRatio(sDist) : rh->distEndRatio(tD ist));
1099 return mFactor < 2400; // empirically found limit 1099 return mFactor < 2400; // empirically found limit
1100 } 1100 }
OLDNEW
« no previous file with comments | « src/core/SkTime.cpp ('k') | src/pathops/SkOpSegment.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698