summaryrefslogtreecommitdiff
path: root/core/fxge/skia
diff options
context:
space:
mode:
authordan sinclair <dsinclair@chromium.org>2017-02-22 19:56:15 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-02-23 01:17:40 +0000
commitb147e07ee36be10ca0796a6566be107077c21a03 (patch)
tree637b1b206000a88fb3e198f648e86a9ee5178f1b /core/fxge/skia
parente3f237740fd8bea50b4a6f37f56455dfa0328546 (diff)
downloadpdfium-b147e07ee36be10ca0796a6566be107077c21a03.tar.xz
Convert point x,y into CFX_PointF
This Cl converts the PointX,PointY pairs into a CFX_PointF. Change-Id: I46897832077c317a5bffb4e568550705decbc40c Reviewed-on: https://pdfium-review.googlesource.com/2821 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'core/fxge/skia')
-rw-r--r--core/fxge/skia/fx_skia_device.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp
index 431491d826..7e23f97287 100644
--- a/core/fxge/skia/fx_skia_device.cpp
+++ b/core/fxge/skia/fx_skia_device.cpp
@@ -280,17 +280,16 @@ SkPath BuildPath(const CFX_PathData* pPathData) {
const CFX_PathData* pFPath = pPathData;
const std::vector<FX_PATHPOINT>& pPoints = pFPath->GetPoints();
for (size_t i = 0; i < pPoints.size(); i++) {
- FX_FLOAT x = pPoints[i].m_PointX;
- FX_FLOAT y = pPoints[i].m_PointY;
+ CFX_PointF point = pPoints[i].m_Point;
FXPT_TYPE point_type = pPoints[i].m_Type;
if (point_type == FXPT_TYPE::MoveTo) {
- skPath.moveTo(x, y);
+ skPath.moveTo(point.x, point.y);
} else if (point_type == FXPT_TYPE::LineTo) {
- skPath.lineTo(x, y);
+ skPath.lineTo(point.x, point.y);
} else if (point_type == FXPT_TYPE::BezierTo) {
- FX_FLOAT x2 = pPoints[i + 1].m_PointX, y2 = pPoints[i + 1].m_PointY;
- FX_FLOAT x3 = pPoints[i + 2].m_PointX, y3 = pPoints[i + 2].m_PointY;
- skPath.cubicTo(x, y, x2, y2, x3, y3);
+ CFX_PointF point2 = pPoints[i + 1].m_Point;
+ CFX_PointF point3 = pPoints[i + 2].m_Point;
+ skPath.cubicTo(point.x, point.y, point2.x, point2.y, point3.x, point3.y);
i += 2;
}
if (pPoints[i].m_CloseFigure)