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

Unified Diff: src/pathops/SkOpEdgeBuilder.h

Issue 14407006: path ops -- handle non-finite numbers (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: src/pathops/SkOpEdgeBuilder.h
===================================================================
--- src/pathops/SkOpEdgeBuilder.h (revision 8862)
+++ src/pathops/SkOpEdgeBuilder.h (working copy)
@@ -22,7 +22,8 @@
SkOpEdgeBuilder(const SkPath& path, SkTArray<SkOpContour>& contours)
: fPath(&path)
- , fContours(contours) {
+ , fContours(contours)
+ , fAllowOpenContours(false) {
init();
}
@@ -38,23 +39,30 @@
}
void addOperand(const SkPath& path);
- void finish();
+ bool finish();
void init();
+ void setAllowOpenContours(bool allow) {
+ fAllowOpenContours = allow;
+ }
private:
+ bool close();
int preFetch();
- void walk();
+ bool walk();
const SkPath* fPath;
- SkTDArray<SkPoint> fPathPts; // FIXME: point directly to path pts instead
- SkTDArray<uint8_t> fPathVerbs; // FIXME: remove
+ SkTDArray<SkPoint> fPathPts;
+ SkTDArray<uint8_t> fPathVerbs;
SkOpContour* fCurrentContour;
SkTArray<SkOpContour>& fContours;
SkTDArray<SkPoint> fReducePts; // segments created on the fly
SkTDArray<int> fExtra; // -1 marks new contour, > 0 offsets into contour
SkPathOpsMask fXorMask[2];
+ const SkPoint* fFinalCurveStart;
+ const SkPoint* fFinalCurveEnd;
int fSecondHalf;
bool fOperand;
+ bool fAllowOpenContours;
};
#endif

Powered by Google App Engine
This is Rietveld 408576698