From 45f73fd6276bcb443ba1f93174b619e247bb0ae6 Mon Sep 17 00:00:00 2001 From: Mira Grudzinska Date: Sun, 9 Jun 2024 23:46:49 +0200 Subject: [PATCH] sw_engine: fix fastTrack condition When checking the fastTrack condition, it's necessary to exclude the outlines with a Bezier curve (Move-Cubic-Line, Move-Cubic-Close, Move-Line-Cubic). @Issue: https://github.com/thorvg/thorvg/issues/2379 --- src/renderer/sw_engine/tvgSwShape.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/renderer/sw_engine/tvgSwShape.cpp b/src/renderer/sw_engine/tvgSwShape.cpp index d8dd40d4..4f069ece 100644 --- a/src/renderer/sw_engine/tvgSwShape.cpp +++ b/src/renderer/sw_engine/tvgSwShape.cpp @@ -420,6 +420,7 @@ static bool _axisAlignedRect(const SwOutline* outline) { //Fast Track: axis-aligned rectangle? if (outline->pts.count != 5) return false; + if (outline->types[2] == SW_CURVE_TYPE_CUBIC) return false; auto pt1 = outline->pts.data + 0; auto pt2 = outline->pts.data + 1;