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

Side by Side Diff: src/core/SkEdge.h

Issue 960353005: Use proper SkFDot6 instead of int (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: follow comments#6: int->SkFDot6 and remove other code Created 5 years, 9 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 | « no previous file | src/core/SkEdge.cpp » ('j') | 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 /* 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
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
OLDNEW
« no previous file with comments | « no previous file | src/core/SkEdge.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698