[gvar] Optimize unpack_points
This commit is contained in:
parent
6d7206b68b
commit
a2059f8f55
|
@ -299,21 +299,21 @@ struct GlyphVariationData
|
|||
uint16_t run_count = (control & POINT_RUN_COUNT_MASK) + 1;
|
||||
if (control & POINTS_ARE_WORDS)
|
||||
{
|
||||
if (unlikely (p + run_count * HBUINT16::static_size > end)) return false;
|
||||
for (j = 0; j < run_count && i < count; j++, i++)
|
||||
{
|
||||
if (unlikely (p + HBUINT16::static_size > end)) return false;
|
||||
n += *(const HBUINT16 *)p;
|
||||
points[i] = n;
|
||||
points.arrayZ[i] = n;
|
||||
p += HBUINT16::static_size;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (unlikely (p + run_count > end)) return false;
|
||||
for (j = 0; j < run_count && i < count; j++, i++)
|
||||
{
|
||||
if (unlikely (p + 1 > end)) return false;
|
||||
n += *p++;
|
||||
points[i] = n;
|
||||
points.arrayZ[i] = n;
|
||||
}
|
||||
}
|
||||
if (j < run_count) return false;
|
||||
|
|
Loading…
Reference in New Issue