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

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

Issue 1323813003: remove duplicate linked list adjustment (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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 | « no previous file | tests/PathOpsBuilderTest.cpp » ('j') | tests/PathOpsBuilderTest.cpp » ('J')
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 #include "SkOpCoincidence.h" 7 #include "SkOpCoincidence.h"
8 #include "SkOpContour.h" 8 #include "SkOpContour.h"
9 #include "SkOpSegment.h" 9 #include "SkOpSegment.h"
10 #include "SkPathWriter.h" 10 #include "SkPathWriter.h"
(...skipping 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after
1430 if (test == &this->fTail) { 1430 if (test == &this->fTail) {
1431 if (spanS == &fHead) { 1431 if (spanS == &fHead) {
1432 debugValidate(); 1432 debugValidate();
1433 return; // if this span has collapsed, remove i t from parent 1433 return; // if this span has collapsed, remove i t from parent
1434 } 1434 }
1435 this->fTail.merge(spanS->upCast()); 1435 this->fTail.merge(spanS->upCast());
1436 debugValidate(); 1436 debugValidate();
1437 return; 1437 return;
1438 } 1438 }
1439 spanS->merge(test->upCast()); 1439 spanS->merge(test->upCast());
1440 spanS->upCast()->setNext(next);
1441 goto checkNextSpan; 1440 goto checkNextSpan;
1442 } 1441 }
1443 } while ((testBase = testBase->next()) != test->ptT()); 1442 } while ((testBase = testBase->next()) != test->ptT());
1444 } while ((startBase = startBase->next()) != spanS->ptT()); 1443 } while ((startBase = startBase->next()) != spanS->ptT());
1445 checkNextSpan: 1444 checkNextSpan:
1446 ; 1445 ;
1447 } while ((test = next)); 1446 } while ((test = next));
1448 spanS = spanS->upCast()->next(); 1447 spanS = spanS->upCast()->next();
1449 } while (!spanS->final()); 1448 } while (!spanS->final());
1450 debugValidate(); 1449 debugValidate();
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
1777 int absOut = SkTAbs(outerWinding); 1776 int absOut = SkTAbs(outerWinding);
1778 int absIn = SkTAbs(innerWinding); 1777 int absIn = SkTAbs(innerWinding);
1779 bool result = absOut == absIn ? outerWinding < 0 : absOut < absIn; 1778 bool result = absOut == absIn ? outerWinding < 0 : absOut < absIn;
1780 return result; 1779 return result;
1781 } 1780 }
1782 1781
1783 int SkOpSegment::windSum(const SkOpAngle* angle) const { 1782 int SkOpSegment::windSum(const SkOpAngle* angle) const {
1784 const SkOpSpan* minSpan = angle->start()->starter(angle->end()); 1783 const SkOpSpan* minSpan = angle->start()->starter(angle->end());
1785 return minSpan->windSum(); 1784 return minSpan->windSum();
1786 } 1785 }
OLDNEW
« no previous file with comments | « no previous file | tests/PathOpsBuilderTest.cpp » ('j') | tests/PathOpsBuilderTest.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698