OLD | NEW |
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 #ifndef SkOpEdgeBuilder_DEFINED | 7 #ifndef SkOpEdgeBuilder_DEFINED |
8 #define SkOpEdgeBuilder_DEFINED | 8 #define SkOpEdgeBuilder_DEFINED |
9 | 9 |
10 #include "SkOpContour.h" | 10 #include "SkOpContour.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 | 36 |
37 SkPathOpsMask xorMask() const { | 37 SkPathOpsMask xorMask() const { |
38 return fXorMask[fOperand]; | 38 return fXorMask[fOperand]; |
39 } | 39 } |
40 | 40 |
41 void addOperand(const SkPath& path); | 41 void addOperand(const SkPath& path); |
42 bool finish(); | 42 bool finish(); |
43 void init(); | 43 void init(); |
44 | 44 |
45 private: | 45 private: |
| 46 void closeContour(const SkPoint& curveEnd, const SkPoint& curveStart); |
46 bool close(); | 47 bool close(); |
47 int preFetch(); | 48 int preFetch(); |
48 bool walk(); | 49 bool walk(); |
49 | 50 |
50 const SkPath* fPath; | 51 const SkPath* fPath; |
51 SkTArray<SkPoint, true> fPathPts; | 52 SkTArray<SkPoint, true> fPathPts; |
52 SkTArray<uint8_t, true> fPathVerbs; | 53 SkTArray<uint8_t, true> fPathVerbs; |
53 SkOpContour* fCurrentContour; | 54 SkOpContour* fCurrentContour; |
54 SkTArray<SkOpContour>& fContours; | 55 SkTArray<SkOpContour>& fContours; |
55 SkTArray<SkPoint, true> fReducePts; // segments created on the fly | |
56 SkTArray<int, true> fExtra; // -1 marks new contour, > 0 offsets into conto
ur | |
57 SkPathOpsMask fXorMask[2]; | 56 SkPathOpsMask fXorMask[2]; |
58 const SkPoint* fFinalCurveStart; | |
59 const SkPoint* fFinalCurveEnd; | |
60 int fSecondHalf; | 57 int fSecondHalf; |
61 bool fOperand; | 58 bool fOperand; |
62 bool fAllowOpenContours; | 59 bool fAllowOpenContours; |
63 bool fUnparseable; | 60 bool fUnparseable; |
64 }; | 61 }; |
65 | 62 |
66 #endif | 63 #endif |
OLD | NEW |