From fa6f123eef4de37c564ddbbe7c935191c4d0259b Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 27 Mar 2024 11:06:28 -0600 Subject: [PATCH] [var] Add a fast path for coord == 0 --- src/hb-ot-layout-common.hh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index af1789772..d1c93e229 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -2471,6 +2471,8 @@ struct VarRegionAxis int peak = peakCoord.to_int (); if (peak == 0 || coord == peak) return 1.f; + else if (coord == 0) // Faster + return 0.f; int start = startCoord.to_int (), end = endCoord.to_int ();