From affe4b09575b297747e66bd0b807d2b1b04822fe Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 23 Feb 2016 16:04:59 -0500 Subject: Remove FXSYS_Div. This is just a wrapper for (a) / (b). Inline the divide. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1727793002 . --- xfa/src/fxgraphics/src/fx_graphics.cpp | 14 +++++++------- xfa/src/fxgraphics/src/fx_path_generator.cpp | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'xfa') diff --git a/xfa/src/fxgraphics/src/fx_graphics.cpp b/xfa/src/fxgraphics/src/fx_graphics.cpp index 2ad7cd5d0c..792f517a09 100644 --- a/xfa/src/fxgraphics/src/fx_graphics.cpp +++ b/xfa/src/fxgraphics/src/fx_graphics.cpp @@ -978,8 +978,8 @@ FX_ERR CFX_Graphics::FillPathWithShading(CFX_Path* path, FX_FLOAT x = (FX_FLOAT)(column); FX_FLOAT y = (FX_FLOAT)(row); FX_FLOAT scale = - FXSYS_Div(((x - start_x) * x_span) + ((y - start_y) * y_span), - axis_len_square); + (((x - start_x) * x_span) + ((y - start_y) * y_span)) / + axis_len_square; if (scale < 0) { if (!_info._fillColor->_shading->_isExtendedBegin) { continue; @@ -1016,7 +1016,7 @@ FX_ERR CFX_Graphics::FillPathWithShading(CFX_Path* path, ((y - start_y) * (y - start_y)) - (start_r * start_r); FX_FLOAT s; if (a == 0) { - s = (FXSYS_Div(-c, b)); + s = -c / b; } else { FX_FLOAT b2_4ac = (b * b) - 4 * (a * c); if (b2_4ac < 0) { @@ -1025,11 +1025,11 @@ FX_ERR CFX_Graphics::FillPathWithShading(CFX_Path* path, FX_FLOAT root = (FXSYS_sqrt(b2_4ac)); FX_FLOAT s1, s2; if (a > 0) { - s1 = FXSYS_Div(-b - root, 2 * a); - s2 = FXSYS_Div(-b + root, 2 * a); + s1 = (-b - root) / (2 * a); + s2 = (-b + root) / (2 * a); } else { - s2 = FXSYS_Div(-b - root, 2 * a); - s1 = FXSYS_Div(-b + root, 2 * a); + s2 = (-b - root) / (2 * a); + s1 = (-b + root) / (2 * a); } if (s2 <= 1.0f || _info._fillColor->_shading->_isExtendedEnd) { s = (s2); diff --git a/xfa/src/fxgraphics/src/fx_path_generator.cpp b/xfa/src/fxgraphics/src/fx_path_generator.cpp index c9e20b35d2..b37105fae8 100644 --- a/xfa/src/fxgraphics/src/fx_path_generator.cpp +++ b/xfa/src/fxgraphics/src/fx_path_generator.cpp @@ -119,8 +119,8 @@ void CFX_PathGenerator::ArcTo(FX_FLOAT x, FX_FLOAT sweep_angle) { FX_FLOAT x0 = FXSYS_cos(sweep_angle / 2); FX_FLOAT y0 = FXSYS_sin(sweep_angle / 2); - FX_FLOAT tx = FXSYS_Div((1.0f - x0) * 4, 3 * 1.0f); - FX_FLOAT ty = y0 - FXSYS_Div(tx * x0, y0); + FX_FLOAT tx = ((1.0f - x0) * 4) / (3 * 1.0f); + FX_FLOAT ty = y0 - ((tx * x0) / y0); FX_FLOAT px[3], py[3]; px[0] = x0 + tx; py[0] = -ty; -- cgit v1.2.3