Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2431)

Unified Diff: src/device/xps/SkXPSDevice.cpp

Issue 1135693003: Revert of Revert of stop calling SkScalarDiv (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkStrokerPriv.cpp ('k') | src/effects/SkCornerPathEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/device/xps/SkXPSDevice.cpp
diff --git a/src/device/xps/SkXPSDevice.cpp b/src/device/xps/SkXPSDevice.cpp
index a5c001393d8ea7dcd78039c0447b7a5808ea91cc..1c06235aef8db7bbf7f99e42e8a89b6aad71bdd4 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] = SkScalarDiv(startToStop, startToEnd);
+ stopOffsets[i] = startToStop / startToEnd;
}
}
@@ -1396,10 +1396,8 @@
SkVector* ppuScale,
const SkIRect& clip, SkIRect* clipIRect) {
//This action is in unit space, but the ppm is specified in physical space.
- ppuScale->fX = SkScalarDiv(this->fCurrentPixelsPerMeter.fX,
- this->fCurrentUnitsPerMeter.fX);
- ppuScale->fY = SkScalarDiv(this->fCurrentPixelsPerMeter.fY,
- this->fCurrentUnitsPerMeter.fY);
+ ppuScale->set(fCurrentPixelsPerMeter.fX / fCurrentUnitsPerMeter.fX,
+ fCurrentPixelsPerMeter.fY / fCurrentUnitsPerMeter.fY);
matrix->postScale(ppuScale->fX, ppuScale->fY);
« no previous file with comments | « src/core/SkStrokerPriv.cpp ('k') | src/effects/SkCornerPathEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698