[cff2] Micro-optimize blend operator

This commit is contained in:
Behdad Esfahbod 2022-11-26 15:11:32 -07:00
parent a331e913dc
commit f159bf075b
1 changed files with 3 additions and 2 deletions

View File

@ -154,8 +154,9 @@ struct cff2_cs_interp_env_t : cs_interp_env_t<ELEM, CFF2Subrs>
{
if (likely (scalars.length == deltas.length))
{
for (unsigned int i = 0; i < scalars.length; i++)
v += (double) scalars[i] * deltas[i].to_real ();
unsigned count = scalars.length;
for (unsigned i = 0; i < count; i++)
v += (double) scalars.arrayZ[i] * deltas.arrayZ[i].to_real ();
}
}
return v;