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

Unified Diff: third_party/agg23/agg_math_stroke.h

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
Index: third_party/agg23/agg_math_stroke.h
diff --git a/third_party/agg23/agg_math_stroke.h b/third_party/agg23/agg_math_stroke.h
index 402028ba67c555a72a8bf5c50dba944d67e0c78a..6d7ba8a96e0eab13d4f85704dfdde126bab73a68 100644
--- a/third_party/agg23/agg_math_stroke.h
+++ b/third_party/agg23/agg_math_stroke.h
@@ -198,10 +198,10 @@ void stroke_calc_join(VertexConsumer& out_vertices,
{
typedef typename VertexConsumer::value_type coord_type;
FX_FLOAT dx1, dy1, dx2, dy2;
- dx1 = FXSYS_MulDiv(width, v1.y - v0.y, len1);
- dy1 = FXSYS_MulDiv(width, v1.x - v0.x, len1);
- dx2 = FXSYS_MulDiv(width, v2.y - v1.y, len2);
- dy2 = FXSYS_MulDiv(width, v2.x - v1.x, len2);
+ dx1 = width * (v1.y - v0.y) / len1;
+ dy1 = width * (v1.x - v0.x) / len1;
+ dx2 = width * (v2.y - v1.y) / len2;
+ dy2 = width * (v2.x - v1.x) / len2;
out_vertices.remove_all();
if(calc_point_location(v0.x, v0.y, v1.x, v1.y, v2.x, v2.y) > 0) {
switch(inner_join) {

Powered by Google App Engine
This is Rietveld 408576698