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

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

Issue 2231663002: Fix SkDEBUGCODE to accept commas (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/pathops/SkPathOpsDebug.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 #ifndef SkPathOpsTSect_DEFINED 7 #ifndef SkPathOpsTSect_DEFINED
8 #define SkPathOpsTSect_DEFINED 8 #define SkPathOpsTSect_DEFINED
9 9
10 #include "SkChunkAlloc.h" 10 #include "SkChunkAlloc.h"
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 SkDRect fBounds; 211 SkDRect fBounds;
212 double fStartT; 212 double fStartT;
213 double fEndT; 213 double fEndT;
214 double fBoundsMax; 214 double fBoundsMax;
215 SkOpDebugBool fCollapsed; 215 SkOpDebugBool fCollapsed;
216 SkOpDebugBool fHasPerp; 216 SkOpDebugBool fHasPerp;
217 SkOpDebugBool fIsLinear; 217 SkOpDebugBool fIsLinear;
218 SkOpDebugBool fIsLine; 218 SkOpDebugBool fIsLine;
219 SkOpDebugBool fDeleted; 219 SkOpDebugBool fDeleted;
220 SkDEBUGCODE(SkOpGlobalState* fDebugGlobalState); 220 SkDEBUGCODE(SkOpGlobalState* fDebugGlobalState);
221 SkDEBUGCODE_(SkTSect<TCurve, OppCurve>* fDebugSect); 221 SkDEBUGCODE(SkTSect<TCurve, OppCurve>* fDebugSect);
222 PATH_OPS_DEBUG_T_SECT_CODE(int fID); 222 PATH_OPS_DEBUG_T_SECT_CODE(int fID);
223 friend class SkTSect<TCurve, OppCurve>; 223 friend class SkTSect<TCurve, OppCurve>;
224 friend class SkTSect<OppCurve, TCurve>; 224 friend class SkTSect<OppCurve, TCurve>;
225 friend class SkTSpan<OppCurve, TCurve>; 225 friend class SkTSpan<OppCurve, TCurve>;
226 }; 226 };
227 227
228 template<typename TCurve, typename OppCurve> 228 template<typename TCurve, typename OppCurve>
229 class SkTSect { 229 class SkTSect {
230 public: 230 public:
231 SkTSect(const TCurve& c SkDEBUGPARAMS(SkOpGlobalState* ) PATH_OPS_DEBUG_T_S ECT_PARAMS(int id)); 231 SkTSect(const TCurve& c SkDEBUGPARAMS(SkOpGlobalState* ) PATH_OPS_DEBUG_T_S ECT_PARAMS(int id));
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 void validate() const; 325 void validate() const;
326 void validateBounded() const; 326 void validateBounded() const;
327 327
328 const TCurve& fCurve; 328 const TCurve& fCurve;
329 SkChunkAlloc fHeap; 329 SkChunkAlloc fHeap;
330 SkTSpan<TCurve, OppCurve>* fHead; 330 SkTSpan<TCurve, OppCurve>* fHead;
331 SkTSpan<TCurve, OppCurve>* fCoincident; 331 SkTSpan<TCurve, OppCurve>* fCoincident;
332 SkTSpan<TCurve, OppCurve>* fDeleted; 332 SkTSpan<TCurve, OppCurve>* fDeleted;
333 int fActiveCount; 333 int fActiveCount;
334 SkDEBUGCODE(SkOpGlobalState* fDebugGlobalState); 334 SkDEBUGCODE(SkOpGlobalState* fDebugGlobalState);
335 SkDEBUGCODE_(SkTSect<OppCurve, TCurve>* fOppSect); 335 SkDEBUGCODE(SkTSect<OppCurve, TCurve>* fOppSect);
336 PATH_OPS_DEBUG_T_SECT_CODE(int fID); 336 PATH_OPS_DEBUG_T_SECT_CODE(int fID);
337 PATH_OPS_DEBUG_T_SECT_CODE(int fDebugCount); 337 PATH_OPS_DEBUG_T_SECT_CODE(int fDebugCount);
338 #if DEBUG_T_SECT 338 #if DEBUG_T_SECT
339 int fDebugAllocatedCount; 339 int fDebugAllocatedCount;
340 #endif 340 #endif
341 friend class SkTSpan<TCurve, OppCurve>; 341 friend class SkTSpan<TCurve, OppCurve>;
342 friend class SkTSpan<OppCurve, TCurve>; 342 friend class SkTSpan<OppCurve, TCurve>;
343 friend class SkTSect<OppCurve, TCurve>; 343 friend class SkTSect<OppCurve, TCurve>;
344 }; 344 };
345 345
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 } 812 }
813 } 813 }
814 #endif 814 #endif
815 } 815 }
816 816
817 template<typename TCurve, typename OppCurve> 817 template<typename TCurve, typename OppCurve>
818 void SkTSpan<TCurve, OppCurve>::validateBounded() const { 818 void SkTSpan<TCurve, OppCurve>::validateBounded() const {
819 #if DEBUG_VALIDATE 819 #if DEBUG_VALIDATE
820 const SkTSpanBounded<OppCurve, TCurve>* testBounded = fBounded; 820 const SkTSpanBounded<OppCurve, TCurve>* testBounded = fBounded;
821 while (testBounded) { 821 while (testBounded) {
822 SkDEBUGCODE_(const SkTSpan<OppCurve, TCurve>* overlap = testBounded->fBo unded); 822 SkDEBUGCODE(const SkTSpan<OppCurve, TCurve>* overlap = testBounded->fBou nded);
823 SkASSERT(!overlap->fDeleted); 823 SkASSERT(!overlap->fDeleted);
824 #if DEBUG_T_SECT 824 #if DEBUG_T_SECT
825 SkASSERT(((this->debugID() ^ overlap->debugID()) & 1) == 1); 825 SkASSERT(((this->debugID() ^ overlap->debugID()) & 1) == 1);
826 SkASSERT(overlap->findOppSpan(this)); 826 SkASSERT(overlap->findOppSpan(this));
827 #endif 827 #endif
828 testBounded = testBounded->fNext; 828 testBounded = testBounded->fNext;
829 } 829 }
830 #endif 830 #endif
831 } 831 }
832 832
(...skipping 1462 matching lines...) Expand 10 before | Expand all | Expand 10 after
2295 --last; 2295 --last;
2296 } else { 2296 } else {
2297 intersections->setCoincident(index++); 2297 intersections->setCoincident(index++);
2298 } 2298 }
2299 intersections->setCoincident(index); 2299 intersections->setCoincident(index);
2300 } 2300 }
2301 SkASSERT(intersections->used() <= TCurve::kMaxIntersections); 2301 SkASSERT(intersections->used() <= TCurve::kMaxIntersections);
2302 } 2302 }
2303 2303
2304 #endif 2304 #endif
OLDNEW
« no previous file with comments | « src/pathops/SkPathOpsDebug.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698