[subset-glyf] Micro-optimize array access

This commit is contained in:
Behdad Esfahbod 2022-11-23 12:28:29 -07:00
parent 356d135ed6
commit 1e8f1ac677
1 changed files with 3 additions and 3 deletions

View File

@ -281,11 +281,11 @@ struct SimpleGlyph
for (unsigned i = 0; i < num_points; i++)
{
uint8_t flag = all_points[i].flag;
uint8_t flag = all_points.arrayZ[i].flag;
flag &= FLAG_ON_CURVE + FLAG_OVERLAP_SIMPLE;
int cur_x = roundf (all_points[i].x);
int cur_y = roundf (all_points[i].y);
int cur_x = roundf (all_points.arrayZ[i].x);
int cur_y = roundf (all_points.arrayZ[i].y);
encode_coord (cur_x - prev_x, flag, FLAG_X_SHORT, FLAG_X_SAME, x_coords);
encode_coord (cur_y - prev_y, flag, FLAG_Y_SHORT, FLAG_Y_SAME, y_coords);
encode_flag (flag, repeat, lastflag, flags);