Lines Matching refs:shift

18     the points into FDot6. This is modulated by the shift parameter, which
22 or pt * 256 for antialiasing. This is implemented as 1 << (shift + 6).
25 or pt >> 8 for antialiasing. This is implemented as pt >> (10 - shift).
30 // away data in value, so just perform a modify up-shift
37 int shift) {
42 x0 = SkScalarRoundToFDot6(p0.fX, shift);
43 y0 = SkScalarRoundToFDot6(p0.fY, shift);
44 x1 = SkScalarRoundToFDot6(p1.fX, shift);
45 y1 = SkScalarRoundToFDot6(p1.fY, shift);
47 float scale = float(1 << (shift + 6));
145 /* We store 1<<shift in a (signed) byte, so its maximum value is 1<<6 == 64.
169 // shift down dist (it is currently in dot6)
173 // When shift > 0, we're using AA and everything is scaled up so we can
177 // each subdivision (shift value) cuts this dist (error) by 1/4
181 bool SkQuadraticEdge::setQuadraticWithoutUpdate(const SkPoint pts[3], int shift) {
186 x0 = SkScalarRoundToFDot6(pts[0].fX, shift);
187 y0 = SkScalarRoundToFDot6(pts[0].fY, shift);
188 x1 = SkScalarRoundToFDot6(pts[1].fX, shift);
189 y1 = SkScalarRoundToFDot6(pts[1].fY, shift);
190 x2 = SkScalarRoundToFDot6(pts[2].fX, shift);
191 y2 = SkScalarRoundToFDot6(pts[2].fY, shift);
193 float scale = float(1 << (shift + 6));
220 // compute number of steps needed (1 << shift)
225 // before this line, shift is the scale up factor for AA;
226 // after this line, shift is the fCurveShift.
227 shift = diff_to_shift(dx, dy, shift);
228 SkASSERT(shift >= 0);
231 if (shift == 0) {
232 shift = 1;
233 } else if (shift > MAX_COEFF_SHIFT) {
234 shift = MAX_COEFF_SHIFT;
239 fCurveCount = SkToS8(1 << shift);
255 * application in updateQuadratic(). Hence we store (shift - 1) in
259 fCurveShift = SkToU8(shift - 1);
265 fQDx = B + (A >> shift); // biased by shift
266 fQDDx = A >> (shift - 1); // biased by shift
272 fQDy = B + (A >> shift); // biased by shift
273 fQDDy = A >> (shift - 1); // biased by shift
281 int SkQuadraticEdge::setQuadratic(const SkPoint pts[3], int shift) {
282 if (!setQuadraticWithoutUpdate(pts, shift)) {
297 int shift = fCurveShift;
304 newx = oldx + (dx >> shift);
306 newy = oldy + (dy >> shift);
351 bool SkCubicEdge::setCubicWithoutUpdate(const SkPoint pts[4], int shift, bool sortY) {
356 x0 = SkScalarRoundToFDot6(pts[0].fX, shift);
357 y0 = SkScalarRoundToFDot6(pts[0].fY, shift);
358 x1 = SkScalarRoundToFDot6(pts[1].fX, shift);
359 y1 = SkScalarRoundToFDot6(pts[1].fY, shift);
360 x2 = SkScalarRoundToFDot6(pts[2].fX, shift);
361 y2 = SkScalarRoundToFDot6(pts[2].fY, shift);
362 x3 = SkScalarRoundToFDot6(pts[3].fX, shift);
363 y3 = SkScalarRoundToFDot6(pts[3].fY, shift);
365 float scale = float(1 << (shift + 6));
395 // compute number of steps needed (1 << shift)
403 shift = diff_to_shift(dx, dy) + 1;
406 SkASSERT(shift > 0);
407 if (shift > MAX_COEFF_SHIFT) {
408 shift = MAX_COEFF_SHIFT;
412 antialias). That means the most we can shift up is 8. However, we
416 int downShift = shift + upShift - 10;
419 upShift = 10 - shift;
423 fCurveCount = SkToS8(SkLeftShift(-1, shift));
424 fCurveShift = SkToU8(shift);
432 fCDx = B + (C >> shift) + (D >> 2*shift); // biased by shift
433 fCDDx = 2*C + (3*D >> (shift - 1)); // biased by 2*shift
434 fCDDDx = 3*D >> (shift - 1); // biased by 2*shift
441 fCDy = B + (C >> shift) + (D >> 2*shift); // biased by shift
442 fCDDy = 2*C + (3*D >> (shift - 1)); // biased by 2*shift
443 fCDDDy = 3*D >> (shift - 1); // biased by 2*shift
451 int SkCubicEdge::setCubic(const SkPoint pts[4], int shift) {
452 if (!this->setCubicWithoutUpdate(pts, shift)) {
483 // SkDebugf("LastX err=%d, LastY err=%d\n", (oldx + (fCDx >> shift) - fLastX), (oldy + (fCDy >> shift) - fLastY));