summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-01-06 12:23:22 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-01-09 18:40:01 +0000
commitc589fdc5e4e996dd6d2502f7267414c471e5fd6d (patch)
tree77cb496ef48a6632a4a5758b4745d5405a95755f
parent661008dde7356ee2ed69787125863539b73b041c (diff)
downloadpdfium-c589fdc5e4e996dd6d2502f7267414c471e5fd6d.tar.xz
HardClip all points used when building paths
CAgg_PathData::BuildPath already HardClips x, y. We need to do this to any other points used, otherwise we risk having huge numbers, and when calling agg methods on these we'll be super slow. BUG=670524, 678767 Change-Id: I35c1cee7bd6481ea57e0df27b2c5202d1cca3301 Reviewed-on: https://pdfium-review.googlesource.com/2158 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>
-rw-r--r--core/fxge/agg/fx_agg_driver.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/fxge/agg/fx_agg_driver.cpp b/core/fxge/agg/fx_agg_driver.cpp
index 2258a257f1..94fe72d301 100644
--- a/core/fxge/agg/fx_agg_driver.cpp
+++ b/core/fxge/agg/fx_agg_driver.cpp
@@ -301,6 +301,9 @@ void CAgg_PathData::BuildPath(const CFX_PathData* pPathData,
pObject2Device->Transform(x2, y2);
pObject2Device->Transform(x3, y3);
}
+ HardClip(x0, y0);
+ HardClip(x2, y2);
+ HardClip(x3, y3);
agg::curve4 curve(x0, y0, x, y, x2, y2, x3, y3);
i += 2;
m_PathData.add_path_curve(curve);