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

Side by Side Diff: src/pathops/SkPathOpsLine.h

Issue 272153002: fix bugs found by computing flat clips in 800K skps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix maybe-uninitialized error in unbuntu Created 6 years, 6 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/pathops/SkPathOpsDebug.cpp ('k') | src/pathops/SkPathOpsLine.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 #ifndef SkPathOpsLine_DEFINED 7 #ifndef SkPathOpsLine_DEFINED
8 #define SkPathOpsLine_DEFINED 8 #define SkPathOpsLine_DEFINED
9 9
10 #include "SkPathOpsPoint.h" 10 #include "SkPathOpsPoint.h"
(...skipping 12 matching lines...) Expand all
23 static SkDLine SubDivide(const SkPoint a[2], double t1, double t2) { 23 static SkDLine SubDivide(const SkPoint a[2], double t1, double t2) {
24 SkDLine line; 24 SkDLine line;
25 line.set(a); 25 line.set(a);
26 return line.subDivide(t1, t2); 26 return line.subDivide(t1, t2);
27 } 27 }
28 28
29 double exactPoint(const SkDPoint& xy) const; 29 double exactPoint(const SkDPoint& xy) const;
30 static double ExactPointH(const SkDPoint& xy, double left, double right, dou ble y); 30 static double ExactPointH(const SkDPoint& xy, double left, double right, dou ble y);
31 static double ExactPointV(const SkDPoint& xy, double top, double bottom, dou ble x); 31 static double ExactPointV(const SkDPoint& xy, double top, double bottom, dou ble x);
32 double isLeft(const SkDPoint& pt) const; 32 double isLeft(const SkDPoint& pt) const;
33 double nearPoint(const SkDPoint& xy) const; 33 double nearPoint(const SkDPoint& xy, bool* unequal) const;
34 bool nearRay(const SkDPoint& xy) const; 34 bool nearRay(const SkDPoint& xy) const;
35 static double NearPointH(const SkDPoint& xy, double left, double right, doub le y); 35 static double NearPointH(const SkDPoint& xy, double left, double right, doub le y);
36 static double NearPointV(const SkDPoint& xy, double top, double bottom, doub le x); 36 static double NearPointV(const SkDPoint& xy, double top, double bottom, doub le x);
37 static bool NearRay(double dx1, double dy1, double dx2, double dy2); 37 static bool NearRay(double dx1, double dy1, double dx2, double dy2);
38 SkDPoint ptAtT(double t) const; 38 SkDPoint ptAtT(double t) const;
39 SkDLine subDivide(double t1, double t2) const; 39 SkDLine subDivide(double t1, double t2) const;
40 40
41 void dump() const; 41 void dump() const;
42 private: 42 private:
43 SkDVector tangent() const { return fPts[0] - fPts[1]; } 43 SkDVector tangent() const { return fPts[0] - fPts[1]; }
44 }; 44 };
45 45
46 #endif 46 #endif
OLDNEW
« no previous file with comments | « src/pathops/SkPathOpsDebug.cpp ('k') | src/pathops/SkPathOpsLine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698