summaryrefslogtreecommitdiff
path: root/core/fxge/skia/fx_skia_device.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-02-15 11:07:32 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-02-15 17:47:57 +0000
commite4602321f3175fa5addb6761d0e94f5c2fc93d0c (patch)
tree6671774659645fad6d9ce55a5910b4665a25094f /core/fxge/skia/fx_skia_device.cpp
parenteb55885e9a9eec670ed98cbd12dc96d63e6a6623 (diff)
downloadpdfium-e4602321f3175fa5addb6761d0e94f5c2fc93d0c.tar.xz
Cleanup CFX_PathData.
This CL replaces the array of path points with a vector. Cleaning up the usage as required. Change-Id: Ifa386a2c847005fef68af748ebe99c4e08961238 Reviewed-on: https://pdfium-review.googlesource.com/2710 Reviewed-by: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxge/skia/fx_skia_device.cpp')
-rw-r--r--core/fxge/skia/fx_skia_device.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp
index ba21bf4134..8263cf66f5 100644
--- a/core/fxge/skia/fx_skia_device.cpp
+++ b/core/fxge/skia/fx_skia_device.cpp
@@ -278,9 +278,8 @@ static void DebugValidate(const CFX_DIBitmap* bitmap,
SkPath BuildPath(const CFX_PathData* pPathData) {
SkPath skPath;
const CFX_PathData* pFPath = pPathData;
- int nPoints = pFPath->GetPointCount();
- FX_PATHPOINT* pPoints = pFPath->GetPoints();
- for (int i = 0; i < nPoints; i++) {
+ 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;
FXPT_TYPE point_type = pPoints[i].m_Type;
@@ -306,7 +305,7 @@ SkMatrix ToSkMatrix(const CFX_Matrix& m) {
return skMatrix;
}
-// use when pdf's y-axis points up insead of down
+// use when pdf's y-axis points up instead of down
SkMatrix ToFlippedSkMatrix(const CFX_Matrix& m, SkScalar flip) {
SkMatrix skMatrix;
skMatrix.setAll(m.a * flip, -m.c * flip, m.e, m.b * flip, -m.d * flip, m.f, 0,
@@ -1432,7 +1431,8 @@ bool CFX_SkiaDeviceDriver::SetClip_PathFill(
GetDeviceCaps(FXDC_PIXEL_WIDTH), GetDeviceCaps(FXDC_PIXEL_HEIGHT));
}
#endif // _SKIA_SUPPORT_PATHS_
- if (pPathData->GetPointCount() == 5 || pPathData->GetPointCount() == 4) {
+ if (pPathData->GetPoints().size() == 5 ||
+ pPathData->GetPoints().size() == 4) {
CFX_FloatRect rectf;
if (pPathData->IsRect(deviceMatrix, &rectf)) {
rectf.Intersect(