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

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

Issue 1107353004: align top and bounds computations (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: clean up code Created 5 years, 7 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/SkDCubicLineIntersection.cpp ('k') | src/pathops/SkOpContour.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 2013 Google Inc. 2 * Copyright 2013 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 SkOpContour_DEFINED 7 #ifndef SkOpContour_DEFINED
8 #define SkOpContour_DEFINED 8 #define SkOpContour_DEFINED
9 9
10 #include "SkOpSegment.h" 10 #include "SkOpSegment.h"
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 } 337 }
338 338
339 void toPartialForward(SkPathWriter* path) const { 339 void toPartialForward(SkPathWriter* path) const {
340 const SkOpSegment* segment = &fHead; 340 const SkOpSegment* segment = &fHead;
341 do { 341 do {
342 segment->addCurveTo(segment->head(), segment->tail(), path, true); 342 segment->addCurveTo(segment->head(), segment->tail(), path, true);
343 } while ((segment = segment->next())); 343 } while ((segment = segment->next()));
344 } 344 }
345 345
346 void toPath(SkPathWriter* path) const; 346 void toPath(SkPathWriter* path) const;
347 void topSortableSegment(const SkPoint& topLeft, SkPoint* bestXY, SkOpSegment ** topStart); 347 void topSortableSegment(const SkDPoint& topLeft, SkDPoint* bestXY, SkOpSegme nt** topStart);
348 SkOpSegment* undoneSegment(SkOpSpanBase** startPtr, SkOpSpanBase** endPtr); 348 SkOpSegment* undoneSegment(SkOpSpanBase** startPtr, SkOpSpanBase** endPtr);
349 349
350 private: 350 private:
351 SkOpGlobalState* fState; 351 SkOpGlobalState* fState;
352 SkOpSegment fHead; 352 SkOpSegment fHead;
353 SkOpSegment* fTail; 353 SkOpSegment* fTail;
354 SkOpContour* fNext; 354 SkOpContour* fNext;
355 SkTDArray<SkOpSegment*> fSortedSegments; // set by find top segment 355 SkTDArray<SkOpSegment*> fSortedSegments; // set by find top segment
356 SkPathOpsBounds fBounds; 356 SkPathOpsBounds fBounds;
357 int fCount; 357 int fCount;
358 int fFirstSorted; 358 int fFirstSorted;
359 bool fDone; // set by find top segment 359 bool fDone; // set by find top segment
360 bool fOperand; // true for the second argument to a binary operator 360 bool fOperand; // true for the second argument to a binary operator
361 bool fXor; // set if original path had even-odd fill 361 bool fXor; // set if original path had even-odd fill
362 bool fOppXor; // set if opposite path had even-odd fill 362 bool fOppXor; // set if opposite path had even-odd fill
363 SkDEBUGCODE(int fID); 363 SkDEBUGCODE(int fID);
364 SkDEBUGCODE(int fIndent); 364 SkDEBUGCODE(int fIndent);
365 }; 365 };
366 366
367 #endif 367 #endif
OLDNEW
« no previous file with comments | « src/pathops/SkDCubicLineIntersection.cpp ('k') | src/pathops/SkOpContour.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698