[glyf] Optimize hb_contour_points_t::extend
This commit is contained in:
parent
98fbe87a26
commit
75ca78a6bb
|
@ -56,9 +56,12 @@ struct contour_point_vector_t : hb_vector_t<contour_point_t>
|
||||||
void extend (const hb_array_t<contour_point_t> &a)
|
void extend (const hb_array_t<contour_point_t> &a)
|
||||||
{
|
{
|
||||||
unsigned int old_len = length;
|
unsigned int old_len = length;
|
||||||
resize (old_len + a.length);
|
if (unlikely (!resize (old_len + a.length)))
|
||||||
for (unsigned int i = 0; i < a.length; i++)
|
return;
|
||||||
(*this)[old_len + i] = a[i];
|
auto arrayZ = this->arrayZ + old_len;
|
||||||
|
unsigned count = a.length;
|
||||||
|
for (unsigned int i = 0; i < count; i++)
|
||||||
|
arrayZ[i] = a.arrayZ[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
void transform (const float (&matrix)[4])
|
void transform (const float (&matrix)[4])
|
||||||
|
|
Loading…
Reference in New Issue