Lines Matching defs: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) {
39 float scale = float(1 << (shift + 6));
135 /* We store 1<<shift in a (signed) byte, so its maximum value is 1<<6 == 64.
159 // shift down dist (it is currently in dot6)
165 // each subdivision (shift value) cuts this dist (error) by 1/4
169 int SkQuadraticEdge::setQuadratic(const SkPoint pts[3], int shift)
174 float scale = float(1 << (shift + 6));
199 // compute number of steps needed (1 << shift)
203 shift = diff_to_shift(dx, dy);
204 SkASSERT(shift >= 0);
207 if (shift == 0) {
208 shift = 1;
209 } else if (shift > MAX_COEFF_SHIFT) {
210 shift = MAX_COEFF_SHIFT;
215 fCurveCount = SkToS8(1 << shift);
231 * application in updateQuadratic(). Hence we store (shift - 1) in
235 fCurveShift = SkToU8(shift - 1);
241 fQDx = B + (A >> shift); // biased by shift
242 fQDDx = A >> (shift - 1); // biased by shift
248 fQDy = B + (A >> shift); // biased by shift
249 fQDDy = A >> (shift - 1); // biased by shift
266 int shift = fCurveShift;
273 newx = oldx + (dx >> shift);
275 newy = oldy + (dy >> shift);
319 int SkCubicEdge::setCubic(const SkPoint pts[4], const SkIRect* clip, int shift)
324 float scale = float(1 << (shift + 6));
356 // compute number of steps needed (1 << shift)
364 shift = diff_to_shift(dx, dy) + 1;
367 SkASSERT(shift > 0);
368 if (shift > MAX_COEFF_SHIFT) {
369 shift = MAX_COEFF_SHIFT;
373 antialias). That means the most we can shift up is 8. However, we
377 int downShift = shift + upShift - 10;
380 upShift = 10 - shift;
384 fCurveCount = SkToS8(-1 << shift);
385 fCurveShift = SkToU8(shift);
393 fCDx = B + (C >> shift) + (D >> 2*shift); // biased by shift
394 fCDDx = 2*C + (3*D >> (shift - 1)); // biased by 2*shift
395 fCDDDx = 3*D >> (shift - 1); // biased by 2*shift
402 fCDy = B + (C >> shift) + (D >> 2*shift); // biased by shift
403 fCDDy = 2*C + (3*D >> (shift - 1)); // biased by 2*shift
404 fCDDDy = 3*D >> (shift - 1); // biased by 2*shift
447 // SkDebugf("LastX err=%d, LastY err=%d\n", (oldx + (fCDx >> shift) - fLastX), (oldy + (fCDy >> shift) - fLastY));