OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef SkEdge_DEFINED | 10 #ifndef SkEdge_DEFINED |
11 #define SkEdge_DEFINED | 11 #define SkEdge_DEFINED |
12 | 12 |
13 #include "SkRect.h" | 13 #include "SkRect.h" |
14 #include "SkFDot6.h" | 14 #include "SkFDot6.h" |
15 #include "SkMath.h" | 15 #include "SkMath.h" |
16 | 16 |
17 // This correctly favors the lower-pixel when y0 is on a 1/2 pixel boundary | 17 // This correctly favors the lower-pixel when y0 is on a 1/2 pixel boundary |
18 #define SkEdge_Compute_DY(top, y0) ((top << 6) + 32 - (y0)) | 18 #define SkEdge_Compute_DY(top, y0) (SkLeftShift(top, 6) + 32 - (y0)) |
19 | 19 |
20 struct SkEdge { | 20 struct SkEdge { |
21 enum Type { | 21 enum Type { |
22 kLine_Type, | 22 kLine_Type, |
23 kQuad_Type, | 23 kQuad_Type, |
24 kCubic_Type | 24 kCubic_Type |
25 }; | 25 }; |
26 | 26 |
27 SkEdge* fNext; | 27 SkEdge* fNext; |
28 SkEdge* fPrev; | 28 SkEdge* fPrev; |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 fFirstY = top; | 126 fFirstY = top; |
127 fLastY = bot - 1; | 127 fLastY = bot - 1; |
128 fCurveCount = 0; | 128 fCurveCount = 0; |
129 fWinding = SkToS8(winding); | 129 fWinding = SkToS8(winding); |
130 fCurveShift = 0; | 130 fCurveShift = 0; |
131 return 1; | 131 return 1; |
132 } | 132 } |
133 | 133 |
134 | 134 |
135 #endif | 135 #endif |
OLD | NEW |