Lines Matching refs:shift

16     the points into FDot6. This is modulated by the shift parameter, which
20 or pt * 256 for antialiasing. This is implemented as 1 << (shift + 6).
23 or pt >> 8 for antialiasing. This is implemented as pt >> (10 - shift).
28 // away data in value, so just perform a modify up-shift
35 int shift) {
40 float scale = float(1 << (shift + 6));
46 shift = 10 - shift;
47 x0 = p0.fX >> shift;
48 y0 = p0.fY >> shift;
49 x1 = p1.fX >> shift;
50 y1 = p1.fY >> shift;
143 /* We store 1<<shift in a (signed) byte, so its maximum value is 1<<6 == 64.
167 // shift down dist (it is currently in dot6)
173 // each subdivision (shift value) cuts this dist (error) by 1/4
177 int SkQuadraticEdge::setQuadratic(const SkPoint pts[3], int shift)
183 float scale = float(1 << (shift + 6));
191 shift = 10 - shift;
192 x0 = pts[0].fX >> shift;
193 y0 = pts[0].fY >> shift;
194 x1 = pts[1].fX >> shift;
195 y1 = pts[1].fY >> shift;
196 x2 = pts[2].fX >> shift;
197 y2 = pts[2].fY >> shift;
217 // compute number of steps needed (1 << shift)
221 shift = diff_to_shift(dx, dy);
222 SkASSERT(shift >= 0);
225 if (shift == 0) {
226 shift = 1;
227 } else if (shift > MAX_COEFF_SHIFT) {
228 shift = MAX_COEFF_SHIFT;
233 fCurveCount = SkToS8(1 << shift);
249 * application in updateQuadratic(). Hence we store (shift - 1) in
253 fCurveShift = SkToU8(shift - 1);
259 fQDx = B + (A >> shift); // biased by shift
260 fQDDx = A >> (shift - 1); // biased by shift
266 fQDy = B + (A >> shift); // biased by shift
267 fQDDy = A >> (shift - 1); // biased by shift
284 int shift = fCurveShift;
291 newx = oldx + (dx >> shift);
293 newy = oldy + (dy >> shift);
337 int SkCubicEdge::setCubic(const SkPoint pts[4], const SkIRect* clip, int shift)
343 float scale = float(1 << (shift + 6));
353 shift = 10 - shift;
354 x0 = pts[0].fX >> shift;
355 y0 = pts[0].fY >> shift;
356 x1 = pts[1].fX >> shift;
357 y1 = pts[1].fY >> shift;
358 x2 = pts[2].fX >> shift;
359 y2 = pts[2].fY >> shift;
360 x3 = pts[3].fX >> shift;
361 y3 = pts[3].fY >> shift;
386 // compute number of steps needed (1 << shift)
394 shift = diff_to_shift(dx, dy) + 1;
397 SkASSERT(shift > 0);
398 if (shift > MAX_COEFF_SHIFT) {
399 shift = MAX_COEFF_SHIFT;
403 antialias). That means the most we can shift up is 8. However, we
407 int downShift = shift + upShift - 10;
410 upShift = 10 - shift;
414 fCurveCount = SkToS8(-1 << shift);
415 fCurveShift = SkToU8(shift);
423 fCDx = B + (C >> shift) + (D >> 2*shift); // biased by shift
424 fCDDx = 2*C + (3*D >> (shift - 1)); // biased by 2*shift
425 fCDDDx = 3*D >> (shift - 1); // biased by 2*shift
432 fCDy = B + (C >> shift) + (D >> 2*shift); // biased by shift
433 fCDDy = 2*C + (3*D >> (shift - 1)); // biased by 2*shift
434 fCDDDy = 3*D >> (shift - 1); // biased by 2*shift
477 // SkDebugf("LastX err=%d, LastY err=%d\n", (oldx + (fCDx >> shift) - fLastX), (oldy + (fCDy >> shift) - fLastY));