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

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

Issue 52653002: pathops work in progress (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: add raster vs gpu test Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/pathops/SkOpEdgeBuilder.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 #ifndef SkOpSegment_DEFINE 7 #ifndef SkOpSegment_DEFINE
8 #define SkOpSegment_DEFINE 8 #define SkOpSegment_DEFINE
9 9
10 #include "SkOpAngle.h" 10 #include "SkOpAngle.h"
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 SkOpSegment* other); 252 SkOpSegment* other);
253 void addTPair(double t, SkOpSegment* other, double otherT, bool borrowWind, const SkPoint& pt); 253 void addTPair(double t, SkOpSegment* other, double otherT, bool borrowWind, const SkPoint& pt);
254 bool betweenTs(int lesser, double testT, int greater) const; 254 bool betweenTs(int lesser, double testT, int greater) const;
255 void checkEnds(); 255 void checkEnds();
256 bool checkSmall(int index) const; 256 bool checkSmall(int index) const;
257 void checkTiny(); 257 void checkTiny();
258 int computeSum(int startIndex, int endIndex, SkOpAngle::IncludeType includeT ype, 258 int computeSum(int startIndex, int endIndex, SkOpAngle::IncludeType includeT ype,
259 SkTArray<SkOpAngle, true>* angles, SkTArray<SkOpAngle*, true >* sorted); 259 SkTArray<SkOpAngle, true>* angles, SkTArray<SkOpAngle*, true >* sorted);
260 int crossedSpanY(const SkPoint& basePt, SkScalar* bestY, double* hitT, bool* hitSomething, 260 int crossedSpanY(const SkPoint& basePt, SkScalar* bestY, double* hitT, bool* hitSomething,
261 double mid, bool opp, bool current) const; 261 double mid, bool opp, bool current) const;
262 bool findCoincidentMatch(const SkOpSpan* span, const SkOpSegment* other, int oStart, int oEnd,
263 int step, SkPoint* startPt, SkPoint* endPt, double* endT) const;
262 SkOpSegment* findNextOp(SkTDArray<SkOpSpan*>* chase, int* nextStart, int* ne xtEnd, 264 SkOpSegment* findNextOp(SkTDArray<SkOpSpan*>* chase, int* nextStart, int* ne xtEnd,
263 bool* unsortable, SkPathOp op, const int xorMiMask, 265 bool* unsortable, SkPathOp op, const int xorMiMask,
264 const int xorSuMask); 266 const int xorSuMask);
265 SkOpSegment* findNextWinding(SkTDArray<SkOpSpan*>* chase, int* nextStart, in t* nextEnd, 267 SkOpSegment* findNextWinding(SkTDArray<SkOpSpan*>* chase, int* nextStart, in t* nextEnd,
266 bool* unsortable); 268 bool* unsortable);
267 SkOpSegment* findNextXor(int* nextStart, int* nextEnd, bool* unsortable); 269 SkOpSegment* findNextXor(int* nextStart, int* nextEnd, bool* unsortable);
270 int findT(double t, const SkOpSegment* ) const;
268 SkOpSegment* findTop(int* tIndex, int* endIndex, bool* unsortable, bool only Sortable); 271 SkOpSegment* findTop(int* tIndex, int* endIndex, bool* unsortable, bool only Sortable);
269 void fixOtherTIndex(); 272 void fixOtherTIndex();
270 void initWinding(int start, int end); 273 void initWinding(int start, int end);
271 void initWinding(int start, int end, double tHit, int winding, SkScalar hitD x, int oppWind, 274 void initWinding(int start, int end, double tHit, int winding, SkScalar hitD x, int oppWind,
272 SkScalar hitOppDx); 275 SkScalar hitOppDx);
273 bool isMissing(double startT, const SkPoint& pt) const; 276 bool isMissing(double startT, const SkPoint& pt) const;
274 bool isTiny(const SkOpAngle* angle) const; 277 bool isTiny(const SkOpAngle* angle) const;
278 bool joinCoincidence(bool end, SkOpSegment* other, double otherT, int step, bool cancel);
275 SkOpSpan* markAndChaseDoneBinary(int index, int endIndex); 279 SkOpSpan* markAndChaseDoneBinary(int index, int endIndex);
276 SkOpSpan* markAndChaseDoneUnary(int index, int endIndex); 280 SkOpSpan* markAndChaseDoneUnary(int index, int endIndex);
277 SkOpSpan* markAndChaseWinding(const SkOpAngle* angle, int winding, int oppWi nding); 281 SkOpSpan* markAndChaseWinding(const SkOpAngle* angle, int winding, int oppWi nding);
278 SkOpSpan* markAngle(int maxWinding, int sumWinding, int oppMaxWinding, int o ppSumWinding, 282 SkOpSpan* markAngle(int maxWinding, int sumWinding, int oppMaxWinding, int o ppSumWinding,
279 bool activeAngle, const SkOpAngle* angle); 283 bool activeAngle, const SkOpAngle* angle);
280 void markDone(int index, int winding); 284 void markDone(int index, int winding);
281 void markDoneBinary(int index); 285 void markDoneBinary(int index);
282 void markDoneUnary(int index); 286 void markDoneUnary(int index);
283 bool nextCandidate(int* start, int* end) const; 287 bool nextCandidate(int* start, int* end) const;
284 int nextSpan(int from, int step) const; 288 int nextSpan(int from, int step) const;
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 SkPath::Verb fVerb; 457 SkPath::Verb fVerb;
454 bool fOperand; 458 bool fOperand;
455 bool fXor; // set if original contour had even-odd fill 459 bool fXor; // set if original contour had even-odd fill
456 bool fOppXor; // set if opposite operand had even-odd fill 460 bool fOppXor; // set if opposite operand had even-odd fill
457 #ifdef SK_DEBUG 461 #ifdef SK_DEBUG
458 int fID; 462 int fID;
459 #endif 463 #endif
460 }; 464 };
461 465
462 #endif 466 #endif
OLDNEW
« no previous file with comments | « src/pathops/SkOpEdgeBuilder.cpp ('k') | src/pathops/SkOpSegment.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698