From b4416c32ed17a36bb17acf27451621abfec77d1b Mon Sep 17 00:00:00 2001 From: Alug Date: Sat, 12 Apr 2025 16:01:43 +0200 Subject: [PATCH] =?UTF-8?q?move=20line=20polyseg=20check=20out=20of=20the?= =?UTF-8?q?=20l=C3=B6=C3=B6p=20if=20theres=20no=20polyobjs=20on=20le=20map?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit seems to reduce a hotspot there significantly --- src/hardware/hw_main.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 9e07efa14..3892a9d52 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -3143,11 +3143,22 @@ doaddline: // without talking about the overdraw of course. sub->sector->validcount = validcount;/// \todo fix that in a better way - while (count--) + if (numPolyObjects) { - if (LIKELY(!line->polyseg)) // ignore segs that belong to polyobjects + while (count--) + { + if (LIKELY(!line->polyseg)) // ignore segs that belong to polyobjects + HWR_AddLine(line); + line++; + } + } + else + { + while (count--) + { HWR_AddLine(line); - line++; + line++; + } } }