Index: src/core/SkEdge.cpp |
diff --git a/src/core/SkEdge.cpp b/src/core/SkEdge.cpp |
index f91f5f87829c45cd221dcefecfe00f6091f8f0e4..c64896f2e0345125ba35d8b5728fb92c612773f9 100644 |
--- a/src/core/SkEdge.cpp |
+++ b/src/core/SkEdge.cpp |
@@ -26,7 +26,7 @@ |
static inline SkFixed SkFDot6ToFixedDiv2(SkFDot6 value) { |
// we want to return SkFDot6ToFixed(value >> 1), but we don't want to throw |
// away data in value, so just perform a modify up-shift |
- return value << (16 - 6 - 1); |
+ return SkLeftShift(value, 16 - 6 - 1); |
} |
///////////////////////////////////////////////////////////////////////// |
@@ -214,8 +214,8 @@ int SkQuadraticEdge::setQuadratic(const SkPoint pts[3], int shift) |
// compute number of steps needed (1 << shift) |
{ |
- SkFDot6 dx = ((x1 << 1) - x0 - x2) >> 2; |
- SkFDot6 dy = ((y1 << 1) - y0 - y2) >> 2; |
+ SkFDot6 dx = (SkLeftShift(x1, 1) - x0 - x2) >> 2; |
+ SkFDot6 dy = (SkLeftShift(y1, 1) - y0 - y2) >> 2; |
shift = diff_to_shift(dx, dy); |
SkASSERT(shift >= 0); |
} |
@@ -312,8 +312,8 @@ int SkQuadraticEdge::updateQuadratic() |
///////////////////////////////////////////////////////////////////////// |
static inline int SkFDot6UpShift(SkFDot6 x, int upShift) { |
- SkASSERT((x << upShift >> upShift) == x); |
- return x << upShift; |
+ SkASSERT((SkLeftShift(x, upShift) >> upShift) == x); |
+ return SkLeftShift(x, upShift); |
} |
/* f(1/3) = (8a + 12b + 6c + d) / 27 |
@@ -403,7 +403,7 @@ int SkCubicEdge::setCubic(const SkPoint pts[4], int shift) { |
} |
fWinding = SkToS8(winding); |
- fCurveCount = SkToS8(-1 << shift); |
+ fCurveCount = SkToS8(SkLeftShift(-1, shift)); |
fCurveShift = SkToU8(shift); |
fCubicDShift = SkToU8(downShift); |