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/SkOpCoincidence.h

Issue 2185063002: require semi at the end of SkASSERT and friends (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: refactor do while as macro Created 4 years, 4 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/gpu/vk/GrVkMemory.cpp ('k') | src/pathops/SkPathOpsDebug.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 SkOpCoincidence_DEFINED 7 #ifndef SkOpCoincidence_DEFINED
8 #define SkOpCoincidence_DEFINED 8 #define SkOpCoincidence_DEFINED
9 9
10 #include "SkTDArray.h" 10 #include "SkTDArray.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 SkCoincidentSpans* next() { return fNext; } 65 SkCoincidentSpans* next() { return fNext; }
66 const SkCoincidentSpans* next() const { return fNext; } 66 const SkCoincidentSpans* next() const { return fNext; }
67 SkCoincidentSpans** nextPtr() { return &fNext; } 67 SkCoincidentSpans** nextPtr() { return &fNext; }
68 int spanCount() const; 68 int spanCount() const;
69 69
70 void set(SkCoincidentSpans* next, const SkOpPtT* coinPtTStart, const SkOpPtT * coinPtTEnd, 70 void set(SkCoincidentSpans* next, const SkOpPtT* coinPtTStart, const SkOpPtT * coinPtTEnd,
71 const SkOpPtT* oppPtTStart, const SkOpPtT* oppPtTEnd 71 const SkOpPtT* oppPtTStart, const SkOpPtT* oppPtTEnd
72 SkDEBUGPARAMS(int id)); 72 SkDEBUGPARAMS(int id));
73 73
74 void setCoinPtTEnd(const SkOpPtT* ptT) { 74 void setCoinPtTEnd(const SkOpPtT* ptT) {
75 SkOPASSERT(ptT == ptT->span()->ptT()) 75 SkOPASSERT(ptT == ptT->span()->ptT());
76 SkASSERT(!fCoinPtTStart || ptT->fT != fCoinPtTStart->fT); 76 SkASSERT(!fCoinPtTStart || ptT->fT != fCoinPtTStart->fT);
77 SkASSERT(!fCoinPtTStart || fCoinPtTStart->segment() == ptT->segment()); 77 SkASSERT(!fCoinPtTStart || fCoinPtTStart->segment() == ptT->segment());
78 fCoinPtTEnd = ptT; 78 fCoinPtTEnd = ptT;
79 ptT->setCoincident(); 79 ptT->setCoincident();
80 } 80 }
81 81
82 void setCoinPtTStart(const SkOpPtT* ptT) { 82 void setCoinPtTStart(const SkOpPtT* ptT) {
83 SkASSERT(ptT == ptT->span()->ptT()) 83 SkASSERT(ptT == ptT->span()->ptT());
84 SkASSERT(!fCoinPtTEnd || ptT->fT != fCoinPtTEnd->fT); 84 SkASSERT(!fCoinPtTEnd || ptT->fT != fCoinPtTEnd->fT);
85 SkASSERT(!fCoinPtTEnd || fCoinPtTEnd->segment() == ptT->segment()); 85 SkASSERT(!fCoinPtTEnd || fCoinPtTEnd->segment() == ptT->segment());
86 fCoinPtTStart = ptT; 86 fCoinPtTStart = ptT;
87 ptT->setCoincident(); 87 ptT->setCoincident();
88 } 88 }
89 89
90 void setEnds(const SkOpPtT* coinPtTEnd, const SkOpPtT* oppPtTEnd) { 90 void setEnds(const SkOpPtT* coinPtTEnd, const SkOpPtT* oppPtTEnd) {
91 this->setCoinPtTEnd(coinPtTEnd); 91 this->setCoinPtTEnd(coinPtTEnd);
92 this->setOppPtTEnd(oppPtTEnd); 92 this->setOppPtTEnd(oppPtTEnd);
93 } 93 }
94 94
95 void setOppPtTEnd(const SkOpPtT* ptT) { 95 void setOppPtTEnd(const SkOpPtT* ptT) {
96 SkOPASSERT(ptT == ptT->span()->ptT()) 96 SkOPASSERT(ptT == ptT->span()->ptT());
97 SkASSERT(!fOppPtTStart || ptT->fT != fOppPtTStart->fT); 97 SkASSERT(!fOppPtTStart || ptT->fT != fOppPtTStart->fT);
98 SkASSERT(!fOppPtTStart || fOppPtTStart->segment() == ptT->segment()); 98 SkASSERT(!fOppPtTStart || fOppPtTStart->segment() == ptT->segment());
99 fOppPtTEnd = ptT; 99 fOppPtTEnd = ptT;
100 ptT->setCoincident(); 100 ptT->setCoincident();
101 } 101 }
102 102
103 void setOppPtTStart(const SkOpPtT* ptT) { 103 void setOppPtTStart(const SkOpPtT* ptT) {
104 SkASSERT(ptT == ptT->span()->ptT()) 104 SkASSERT(ptT == ptT->span()->ptT());
105 SkASSERT(!fOppPtTEnd || ptT->fT != fOppPtTEnd->fT); 105 SkASSERT(!fOppPtTEnd || ptT->fT != fOppPtTEnd->fT);
106 SkASSERT(!fOppPtTEnd || fOppPtTEnd->segment() == ptT->segment()); 106 SkASSERT(!fOppPtTEnd || fOppPtTEnd->segment() == ptT->segment());
107 fOppPtTStart = ptT; 107 fOppPtTStart = ptT;
108 ptT->setCoincident(); 108 ptT->setCoincident();
109 } 109 }
110 110
111 void setStarts(const SkOpPtT* coinPtTStart, const SkOpPtT* oppPtTStart) { 111 void setStarts(const SkOpPtT* coinPtTStart, const SkOpPtT* oppPtTStart) {
112 this->setCoinPtTStart(coinPtTStart); 112 this->setCoinPtTStart(coinPtTStart);
113 this->setOppPtTStart(oppPtTStart); 113 this->setOppPtTStart(oppPtTStart);
114 } 114 }
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 SkCoincidentSpans* fTop; 304 SkCoincidentSpans* fTop;
305 SkOpGlobalState* fGlobalState; 305 SkOpGlobalState* fGlobalState;
306 bool fContinue; 306 bool fContinue;
307 bool fSpanDeleted; 307 bool fSpanDeleted;
308 bool fPtAllocated; 308 bool fPtAllocated;
309 bool fCoinExtended; 309 bool fCoinExtended;
310 bool fSpanMerged; 310 bool fSpanMerged;
311 }; 311 };
312 312
313 #endif 313 #endif
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkMemory.cpp ('k') | src/pathops/SkPathOpsDebug.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698