Index: src/device/xps/SkXPSDevice.cpp |
diff --git a/src/device/xps/SkXPSDevice.cpp b/src/device/xps/SkXPSDevice.cpp |
index 1c06235aef8db7bbf7f99e42e8a89b6aad71bdd4..a5c001393d8ea7dcd78039c0447b7a5808ea91cc 100644 |
--- a/src/device/xps/SkXPSDevice.cpp |
+++ b/src/device/xps/SkXPSDevice.cpp |
@@ -512,7 +512,7 @@ |
SkScalar startToStop = (stopTransformed.fX - startTransformed.fX) |
+ (stopTransformed.fY - startTransformed.fY); |
//Percentage along transformed line. |
- stopOffsets[i] = startToStop / startToEnd; |
+ stopOffsets[i] = SkScalarDiv(startToStop, startToEnd); |
} |
} |
@@ -1396,8 +1396,10 @@ |
SkVector* ppuScale, |
const SkIRect& clip, SkIRect* clipIRect) { |
//This action is in unit space, but the ppm is specified in physical space. |
- ppuScale->set(fCurrentPixelsPerMeter.fX / fCurrentUnitsPerMeter.fX, |
- fCurrentPixelsPerMeter.fY / fCurrentUnitsPerMeter.fY); |
+ ppuScale->fX = SkScalarDiv(this->fCurrentPixelsPerMeter.fX, |
+ this->fCurrentUnitsPerMeter.fX); |
+ ppuScale->fY = SkScalarDiv(this->fCurrentPixelsPerMeter.fY, |
+ this->fCurrentUnitsPerMeter.fY); |
matrix->postScale(ppuScale->fX, ppuScale->fY); |