Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Unified Diff: third_party/agg23/agg_vcgen_stroke.cpp

Issue 1726893002: Remove FXSYS_MulDiv(a, b, c). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« core/include/fxcrt/fx_system.h ('K') | « third_party/agg23/agg_math_stroke.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/agg23/agg_vcgen_stroke.cpp
diff --git a/third_party/agg23/agg_vcgen_stroke.cpp b/third_party/agg23/agg_vcgen_stroke.cpp
index ef8bc27864c00265e9cd477116a2c81fe52bd7d6..afc4ee6f9b87f318f881410752afd54f677dc286 100644
--- a/third_party/agg23/agg_vcgen_stroke.cpp
+++ b/third_party/agg23/agg_vcgen_stroke.cpp
@@ -68,14 +68,13 @@ static inline void calc_butt_cap(FX_FLOAT* cap,
const vertex_dist& v0,
const vertex_dist& v1,
FX_FLOAT len,
- FX_FLOAT width)
-{
- FX_FLOAT dx = FXSYS_MulDiv(v1.y - v0.y, width, len);
- FX_FLOAT dy = FXSYS_MulDiv(v1.x - v0.x, width, len);
- cap[0] = v0.x - dx;
- cap[1] = v0.y + dy;
- cap[2] = v0.x + dx;
- cap[3] = v0.y - dy;
+ FX_FLOAT width) {
+ FX_FLOAT dx = (v1.y - v0.y) * width / len;
+ FX_FLOAT dy = (v1.x - v0.x) * width / len;
+ cap[0] = v0.x - dx;
+ cap[1] = v0.y + dy;
+ cap[2] = v0.x + dx;
+ cap[3] = v0.y - dy;
}
void vcgen_stroke::rewind(unsigned)
{
« core/include/fxcrt/fx_system.h ('K') | « third_party/agg23/agg_math_stroke.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698