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

Side by Side Diff: src/pathops/SkPathOpsDebug.cpp

Issue 2357353002: split tight quads and cubics (Closed)
Patch Set: fix linux build Created 4 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/pathops/SkPathOpsDebug.h ('k') | src/pathops/SkPathOpsOp.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 7
8 #include "SkMutex.h" 8 #include "SkMutex.h"
9 #include "SkOpCoincidence.h" 9 #include "SkOpCoincidence.h"
10 #include "SkOpContour.h" 10 #include "SkOpContour.h"
(...skipping 1858 matching lines...) Expand 10 before | Expand all | Expand 10 after
1869 double oStart, double oEnd, const SkOpSegment* oSegment, 1869 double oStart, double oEnd, const SkOpSegment* oSegment,
1870 const char* id, SkPathOpsDebug::GlitchLog* log) { 1870 const char* id, SkPathOpsDebug::GlitchLog* log) {
1871 SkASSERT(next != end); 1871 SkASSERT(next != end);
1872 SkASSERT(!next->contains(end) || log); 1872 SkASSERT(!next->contains(end) || log);
1873 if (next->t() > end->t()) { 1873 if (next->t() > end->t()) {
1874 SkTSwap(next, end); 1874 SkTSwap(next, end);
1875 } 1875 }
1876 do { 1876 do {
1877 const SkOpPtT* ptT = next->ptT(); 1877 const SkOpPtT* ptT = next->ptT();
1878 int index = 0; 1878 int index = 0;
1879 bool somethingBetween; 1879 bool somethingBetween = false;
1880 do { 1880 do {
1881 ++index; 1881 ++index;
1882 ptT = ptT->next(); 1882 ptT = ptT->next();
1883 const SkOpPtT* checkPtT = next->ptT(); 1883 const SkOpPtT* checkPtT = next->ptT();
1884 if (ptT == checkPtT) { 1884 if (ptT == checkPtT) {
1885 break; 1885 break;
1886 } 1886 }
1887 bool looped = false; 1887 bool looped = false;
1888 for (int check = 0; check < index; ++check) { 1888 for (int check = 0; check < index; ++check) {
1889 if ((looped = checkPtT == ptT)) { 1889 if ((looped = checkPtT == ptT)) {
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
2637 #endif 2637 #endif
2638 SkPath::FillType fillType = path.getFillType(); 2638 SkPath::FillType fillType = path.getFillType();
2639 SkASSERT(fillType >= SkPath::kWinding_FillType && fillType <= SkPath::kInver seEvenOdd_FillType); 2639 SkASSERT(fillType >= SkPath::kWinding_FillType && fillType <= SkPath::kInver seEvenOdd_FillType);
2640 if (includeDeclaration) { 2640 if (includeDeclaration) {
2641 SkDebugf(" SkPath %s;\n", name); 2641 SkDebugf(" SkPath %s;\n", name);
2642 } 2642 }
2643 SkDebugf(" %s.setFillType(SkPath::%s);\n", name, gFillTypeStr[fillType]); 2643 SkDebugf(" %s.setFillType(SkPath::%s);\n", name, gFillTypeStr[fillType]);
2644 iter.setPath(path); 2644 iter.setPath(path);
2645 showPathContours(iter, name); 2645 showPathContours(iter, name);
2646 } 2646 }
OLDNEW
« no previous file with comments | « src/pathops/SkPathOpsDebug.h ('k') | src/pathops/SkPathOpsOp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698