From 32c16e3a6f46d9ec9658b03d686db348c12e0a7c Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Sun, 3 Mar 2024 15:31:18 +0900 Subject: [PATCH] sw_engine: fix a regression bug. stroke line drawing has been broken at a certain case, this reverts a part of change from the old optimization: d81f5d29fb66f8d56e6197ca35dc375befc535e9 note that this change wouldn't affect any performance. issue: https://github.com/thorvg/thorvg/issues/2015 --- src/renderer/sw_engine/tvgSwMath.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/renderer/sw_engine/tvgSwMath.cpp b/src/renderer/sw_engine/tvgSwMath.cpp index 4dae3122..ad5a2b73 100644 --- a/src/renderer/sw_engine/tvgSwMath.cpp +++ b/src/renderer/sw_engine/tvgSwMath.cpp @@ -50,12 +50,6 @@ bool mathSmallCubic(const SwPoint* base, SwFixed& angleIn, SwFixed& angleMid, Sw auto d2 = base[1] - base[2]; auto d3 = base[0] - base[1]; - if (d1 == d2 || d2 == d3) { - if (d3.small()) angleIn = angleMid = angleOut = 0; - else angleIn = angleMid = angleOut = mathAtan(d3); - return true; - } - if (d1.small()) { if (d2.small()) { if (d3.small()) {