| OLD | NEW |
| 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 "SkOpTAllocator.h" | 10 #include "SkOpTAllocator.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 class SkOpCoincidence { | 26 class SkOpCoincidence { |
| 27 public: | 27 public: |
| 28 SkOpCoincidence() | 28 SkOpCoincidence() |
| 29 : fHead(NULL) { | 29 : fHead(NULL) { |
| 30 } | 30 } |
| 31 | 31 |
| 32 void add(SkOpPtT* coinPtTStart, SkOpPtT* coinPtTEnd, SkOpPtT* oppPtTStart, | 32 void add(SkOpPtT* coinPtTStart, SkOpPtT* coinPtTEnd, SkOpPtT* oppPtTStart, |
| 33 SkOpPtT* oppPtTEnd, SkChunkAlloc* allocator); | 33 SkOpPtT* oppPtTEnd, SkChunkAlloc* allocator); |
| 34 bool addMissing(SkChunkAlloc* allocator); | 34 bool addMissing(SkChunkAlloc* allocator); |
| 35 void addMissing(SkCoincidentSpans* check, SkChunkAlloc* allocator); |
| 35 bool apply(); | 36 bool apply(); |
| 36 bool contains(SkOpPtT* coinPtTStart, SkOpPtT* coinPtTEnd, SkOpPtT* oppPtTSta
rt, | 37 bool contains(SkOpPtT* coinPtTStart, SkOpPtT* coinPtTEnd, SkOpPtT* oppPtTSta
rt, |
| 37 SkOpPtT* oppPtTEnd, bool flipped); | 38 SkOpPtT* oppPtTEnd, bool flipped); |
| 38 void detach(SkCoincidentSpans* ); | 39 void detach(SkCoincidentSpans* ); |
| 39 void dump() const; | 40 void dump() const; |
| 40 void expand(); | 41 void expand(); |
| 41 void fixUp(SkOpPtT* deleted, SkOpPtT* kept); | 42 void fixUp(SkOpPtT* deleted, SkOpPtT* kept); |
| 42 void mark(); | 43 void mark(); |
| 43 | 44 |
| 44 private: | 45 private: |
| 45 bool addIfMissing(const SkOpPtT* over1s, const SkOpPtT* over1e, | 46 bool addIfMissing(const SkOpPtT* over1s, const SkOpPtT* over1e, |
| 46 const SkOpPtT* over2s, const SkOpPtT* over2e, double tStar
t, double tEnd, | 47 const SkOpPtT* over2s, const SkOpPtT* over2e, double tStar
t, double tEnd, |
| 47 SkOpPtT* coinPtTStart, const SkOpPtT* coinPtTEnd, | 48 SkOpPtT* coinPtTStart, const SkOpPtT* coinPtTEnd, |
| 48 SkOpPtT* oppPtTStart, const SkOpPtT* oppPtTEnd, | 49 SkOpPtT* oppPtTStart, const SkOpPtT* oppPtTEnd, |
| 49 SkChunkAlloc* allocator); | 50 SkChunkAlloc* allocator); |
| 50 bool overlap(const SkOpPtT* coinStart1, const SkOpPtT* coinEnd1, | 51 bool overlap(const SkOpPtT* coinStart1, const SkOpPtT* coinEnd1, |
| 51 const SkOpPtT* coinStart2, const SkOpPtT* coinEnd2, | 52 const SkOpPtT* coinStart2, const SkOpPtT* coinEnd2, |
| 52 double* overS, double* overE) const; | 53 double* overS, double* overE) const; |
| 53 | 54 |
| 54 SkCoincidentSpans* fHead; | 55 SkCoincidentSpans* fHead; |
| 55 }; | 56 }; |
| 56 | 57 |
| 57 #endif | 58 #endif |
| OLD | NEW |