Lines Matching refs:shift

15     the points into FDot6. This is modulated by the shift parameter, which
19 or pt * 256 for antialiasing. This is implemented as 1 << (shift + 6).
22 or pt >> 8 for antialiasing. This is implemented as pt >> (10 - shift).
27 // away data in value, so just perform a modify up-shift
34 int shift) {
39 x0 = SkScalarRoundToFDot6(p0.fX, shift);
40 y0 = SkScalarRoundToFDot6(p0.fY, shift);
41 x1 = SkScalarRoundToFDot6(p1.fX, shift);
42 y1 = SkScalarRoundToFDot6(p1.fY, shift);
44 float scale = float(1 << (shift + 6));
141 /* We store 1<<shift in a (signed) byte, so its maximum value is 1<<6 == 64.
165 // shift down dist (it is currently in dot6)
169 // 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));
219 // compute number of steps needed (1 << shift)
224 // before this line, shift is the scale up factor for AA;
225 // after this line, shift is the fCurveShift.
226 shift = diff_to_shift(dx, dy, shift);
227 SkASSERT(shift >= 0);
230 if (shift == 0) {
231 shift = 1;
232 } else if (shift > MAX_COEFF_SHIFT) {
233 shift = MAX_COEFF_SHIFT;
238 fCurveCount = SkToS8(1 << shift);
254 * application in updateQuadratic(). Hence we store (shift - 1) in
258 fCurveShift = SkToU8(shift - 1);
264 fQDx = B + (A >> shift); // biased by shift
265 fQDDx = A >> (shift - 1); // biased by shift
271 fQDy = B + (A >> shift); // biased by shift
272 fQDDy = A >> (shift - 1); // biased by shift
280 int SkQuadraticEdge::setQuadratic(const SkPoint pts[3], int shift) {
281 if (!setQuadraticWithoutUpdate(pts, shift)) {
296 int shift = fCurveShift;
303 newx = oldx + (dx >> shift);
305 newy = oldy + (dy >> shift);
350 bool SkCubicEdge::setCubicWithoutUpdate(const SkPoint pts[4], int shift, bool sortY) {
355 x0 = SkScalarRoundToFDot6(pts[0].fX, shift);
356 y0 = SkScalarRoundToFDot6(pts[0].fY, shift);
357 x1 = SkScalarRoundToFDot6(pts[1].fX, shift);
358 y1 = SkScalarRoundToFDot6(pts[1].fY, shift);
359 x2 = SkScalarRoundToFDot6(pts[2].fX, shift);
360 y2 = SkScalarRoundToFDot6(pts[2].fY, shift);
361 x3 = SkScalarRoundToFDot6(pts[3].fX, shift);
362 y3 = SkScalarRoundToFDot6(pts[3].fY, shift);
364 float scale = float(1 << (shift + 6));
393 // compute number of steps needed (1 << shift)
401 shift = diff_to_shift(dx, dy) + 1;
404 SkASSERT(shift > 0);
405 if (shift > MAX_COEFF_SHIFT) {
406 shift = MAX_COEFF_SHIFT;
410 antialias). That means the most we can shift up is 8. However, we
414 int downShift = shift + upShift - 10;
417 upShift = 10 - shift;
421 fCurveCount = SkToS8(SkLeftShift(-1, shift));
422 fCurveShift = SkToU8(shift);
430 fCDx = B + (C >> shift) + (D >> 2*shift); // biased by shift
431 fCDDx = 2*C + (3*D >> (shift - 1)); // biased by 2*shift
432 fCDDDx = 3*D >> (shift - 1); // biased by 2*shift
439 fCDy = B + (C >> shift) + (D >> 2*shift); // biased by shift
440 fCDDy = 2*C + (3*D >> (shift - 1)); // biased by 2*shift
441 fCDDDy = 3*D >> (shift - 1); // biased by 2*shift
449 int SkCubicEdge::setCubic(const SkPoint pts[4], int shift) {
450 if (!this->setCubicWithoutUpdate(pts, shift)) {
481 // SkDebugf("LastX err=%d, LastY err=%d\n", (oldx + (fCDx >> shift) - fLastX), (oldy + (fCDy >> shift) - fLastY));