| 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 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 | 113 |
| 114 int top = SkFDot6Round(y0); | 114 int top = SkFDot6Round(y0); |
| 115 int bot = SkFDot6Round(y1); | 115 int bot = SkFDot6Round(y1); |
| 116 | 116 |
| 117 // are we a zero-height line? | 117 // are we a zero-height line? |
| 118 if (top == bot) { | 118 if (top == bot) { |
| 119 return 0; | 119 return 0; |
| 120 } | 120 } |
| 121 | 121 |
| 122 SkFixed slope = SkFDot6Div(x1 - x0, y1 - y0); | 122 SkFixed slope = SkFDot6Div(x1 - x0, y1 - y0); |
| 123 const int dy = SkEdge_Compute_DY(top, y0); | 123 const SkFDot6 dy = SkEdge_Compute_DY(top, y0); |
| 124 | 124 |
| 125 fX = SkFDot6ToFixed(x0 + SkFixedMul(slope, dy)); // + SK_Fixed1/2 | 125 fX = SkFDot6ToFixed(x0 + SkFixedMul(slope, dy)); // + SK_Fixed1/2 |
| 126 fDX = slope; | 126 fDX = slope; |
| 127 fFirstY = top; | 127 fFirstY = top; |
| 128 fLastY = bot - 1; | 128 fLastY = bot - 1; |
| 129 fCurveCount = 0; | 129 fCurveCount = 0; |
| 130 fWinding = SkToS8(winding); | 130 fWinding = SkToS8(winding); |
| 131 fCurveShift = 0; | 131 fCurveShift = 0; |
| 132 return 1; | 132 return 1; |
| 133 } | 133 } |
| 134 | 134 |
| 135 | 135 |
| 136 #endif | 136 #endif |
| OLD | NEW |