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

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

Issue 1034073004: add legacy pathop enums; fix uninitialized warning (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: temporarily define legacy pathops all the time Created 5 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 unified diff | Download patch
« no previous file with comments | « include/pathops/SkPathOps.h ('k') | no next file » | 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 2014 Google Inc. 2 * Copyright 2014 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 "SkChunkAlloc.h" 8 #include "SkChunkAlloc.h"
9 #include "SkPathOpsBounds.h" 9 #include "SkPathOpsBounds.h"
10 #include "SkPathOpsRect.h" 10 #include "SkPathOpsRect.h"
(...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 1015
1016 template<typename TCurve> 1016 template<typename TCurve>
1017 SkTSpan<TCurve>* SkTSect<TCurve>::extractCoincident(SkTSect* sect2, SkTSpan<TCur ve>* first, 1017 SkTSpan<TCurve>* SkTSect<TCurve>::extractCoincident(SkTSect* sect2, SkTSpan<TCur ve>* first,
1018 SkTSpan<TCurve>* last) { 1018 SkTSpan<TCurve>* last) {
1019 first = findCoincidentRun(first, &last, sect2); 1019 first = findCoincidentRun(first, &last, sect2);
1020 if (!first) { 1020 if (!first) {
1021 return NULL; 1021 return NULL;
1022 } 1022 }
1023 // march outwards to find limit of coincidence from here to previous and nex t spans 1023 // march outwards to find limit of coincidence from here to previous and nex t spans
1024 double startT = first->fStartT; 1024 double startT = first->fStartT;
1025 double oppStartT; 1025 double oppStartT SK_INIT_TO_AVOID_WARNING;
1026 double oppEndT SK_INIT_TO_AVOID_WARNING; 1026 double oppEndT SK_INIT_TO_AVOID_WARNING;
1027 SkTSpan<TCurve>* prev = first->fPrev; 1027 SkTSpan<TCurve>* prev = first->fPrev;
1028 SkASSERT(first->fCoinStart.isCoincident()); 1028 SkASSERT(first->fCoinStart.isCoincident());
1029 SkTSpan<TCurve>* oppFirst = first->findOppT(first->fCoinStart.perpT()); 1029 SkTSpan<TCurve>* oppFirst = first->findOppT(first->fCoinStart.perpT());
1030 SkASSERT(last->fCoinEnd.isCoincident()); 1030 SkASSERT(last->fCoinEnd.isCoincident());
1031 bool oppMatched = first->fCoinStart.perpT() < first->fCoinEnd.perpT(); 1031 bool oppMatched = first->fCoinStart.perpT() < first->fCoinEnd.perpT();
1032 double coinStart; 1032 double coinStart;
1033 SkDEBUGCODE(double coinEnd); 1033 SkDEBUGCODE(double coinEnd);
1034 if (prev && prev->fEndT == startT 1034 if (prev && prev->fEndT == startT
1035 && this->binarySearchCoin(sect2, startT, prev->fStartT - startT, &co inStart, 1035 && this->binarySearchCoin(sect2, startT, prev->fStartT - startT, &co inStart,
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after
1947 } else if (intersections->isCoincident(index + 1)) { 1947 } else if (intersections->isCoincident(index + 1)) {
1948 intersections->removeOne(index + 1); 1948 intersections->removeOne(index + 1);
1949 --last; 1949 --last;
1950 } else { 1950 } else {
1951 intersections->setCoincident(index++); 1951 intersections->setCoincident(index++);
1952 } 1952 }
1953 intersections->setCoincident(index); 1953 intersections->setCoincident(index);
1954 } 1954 }
1955 SkASSERT(intersections->used() <= TCurve::kMaxIntersections); 1955 SkASSERT(intersections->used() <= TCurve::kMaxIntersections);
1956 } 1956 }
OLDNEW
« no previous file with comments | « include/pathops/SkPathOps.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698