From c589fdc5e4e996dd6d2502f7267414c471e5fd6d Mon Sep 17 00:00:00 2001 From: Nicolas Pena Date: Fri, 6 Jan 2017 12:23:22 -0500 Subject: HardClip all points used when building paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Commit-Queue: Nicolás Peña --- core/fxge/agg/fx_agg_driver.cpp | 3 +++ 1 file changed, 3 insertions(+) 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); -- cgit v1.2.3