summaryrefslogtreecommitdiff
path: root/core/src/fxge/ge
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2016-02-23 15:23:29 -0500
committerDan Sinclair <dsinclair@chromium.org>2016-02-23 15:23:29 -0500
commit2c8fad44315db58f5b3222161dcb699691dca904 (patch)
tree70e9bdf55e1e3197d8bd088abd103012b602e32f /core/src/fxge/ge
parent2886a25b68225ad3ad70d417b01108ad1d126488 (diff)
downloadpdfium-2c8fad44315db58f5b3222161dcb699691dca904.tar.xz
Remove FXSYS_Mul.
This define just multiples the two parameters together. Inline the *'s. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1729613003 .
Diffstat (limited to 'core/src/fxge/ge')
-rw-r--r--core/src/fxge/ge/fx_ge_path.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/core/src/fxge/ge/fx_ge_path.cpp b/core/src/fxge/ge/fx_ge_path.cpp
index 23b1c2fe07..0084f092d1 100644
--- a/core/src/fxge/ge/fx_ge_path.cpp
+++ b/core/src/fxge/ge/fx_ge_path.cpp
@@ -264,14 +264,14 @@ static void _UpdateLineJoinPoints(CFX_FloatRect& rect,
}
if (!bStartVert) {
start_k = FXSYS_Div(middle_y - start_y, middle_x - start_x);
- start_c = middle_y - FXSYS_Mul(start_k, middle_x);
+ start_c = middle_y - (start_k * middle_x);
start_len = FXSYS_sqrt2(start_x - middle_x, start_y - middle_y);
start_dc = (FX_FLOAT)FXSYS_fabs(
FXSYS_MulDiv(half_width, start_len, start_x - middle_x));
}
if (!bEndVert) {
end_k = FXSYS_Div(end_y - middle_y, end_x - middle_x);
- end_c = middle_y - FXSYS_Mul(end_k, middle_x);
+ end_c = middle_y - (end_k * middle_x);
end_len = FXSYS_sqrt2(end_x - middle_x, end_y - middle_y);
end_dc = (FX_FLOAT)FXSYS_fabs(
FXSYS_MulDiv(half_width, end_len, end_x - middle_x));
@@ -284,10 +284,10 @@ static void _UpdateLineJoinPoints(CFX_FloatRect& rect,
outside_x -= half_width;
}
FX_FLOAT outside_y;
- if (start_y < FXSYS_Mul(end_k, start_x) + end_c) {
- outside_y = FXSYS_Mul(end_k, outside_x) + end_c + end_dc;
+ if (start_y < (end_k * start_x) + end_c) {
+ outside_y = (end_k * outside_x) + end_c + end_dc;
} else {
- outside_y = FXSYS_Mul(end_k, outside_x) + end_c - end_dc;
+ outside_y = (end_k * outside_x) + end_c - end_dc;
}
rect.UpdateRect(outside_x, outside_y);
return;
@@ -300,10 +300,10 @@ static void _UpdateLineJoinPoints(CFX_FloatRect& rect,
outside_x -= half_width;
}
FX_FLOAT outside_y;
- if (end_y < FXSYS_Mul(start_k, end_x) + start_c) {
- outside_y = FXSYS_Mul(start_k, outside_x) + start_c + start_dc;
+ if (end_y < (start_k * end_x) + start_c) {
+ outside_y = (start_k * outside_x) + start_c + start_dc;
} else {
- outside_y = FXSYS_Mul(start_k, outside_x) + start_c - start_dc;
+ outside_y = (start_k * outside_x) + start_c - start_dc;
}
rect.UpdateRect(outside_x, outside_y);
return;
@@ -320,19 +320,19 @@ static void _UpdateLineJoinPoints(CFX_FloatRect& rect,
return;
}
FX_FLOAT start_outside_c = start_c;
- if (end_y < FXSYS_Mul(start_k, end_x) + start_c) {
+ if (end_y < (start_k * end_x) + start_c) {
start_outside_c += start_dc;
} else {
start_outside_c -= start_dc;
}
FX_FLOAT end_outside_c = end_c;
- if (start_y < FXSYS_Mul(end_k, start_x) + end_c) {
+ if (start_y < (end_k * start_x) + end_c) {
end_outside_c += end_dc;
} else {
end_outside_c -= end_dc;
}
FX_FLOAT join_x = FXSYS_Div(end_outside_c - start_outside_c, start_k - end_k);
- FX_FLOAT join_y = FXSYS_Mul(start_k, join_x) + start_outside_c;
+ FX_FLOAT join_y = (start_k * join_x) + start_outside_c;
rect.UpdateRect(join_x, join_y);
}
CFX_FloatRect CFX_PathData::GetBoundingBox(FX_FLOAT line_width,