[hvgl] Iterate all four iterators together

Instead of trying every row, sparsely process non-trivial rows.
This commit is contained in:
Behdad Esfahbod committed 2025-03-02 16:57:54 -07:00
1 parent a1fba4ebd4
commit 3a8d6d60ee
1 file changed
+13 -1
+13 -1
View File
@@ -325,8 +325,20 @@ PartComposite::apply_transforms (hb_array_t<hb_transform_t> transforms,
auto extremum_rotation_deltas = extremumRotationDelta.as_array (sparseExtremumRotationCount);
auto extremum_rotation_indices = extremumRotationIndex.as_array (sparseExtremumRotationCount);
for (unsigned row = 0; row < transforms.length; row++)
while (true)
{
unsigned row = transforms.length;
if (master_translation_indices)
row = hb_min (row, *master_translation_indices);
if (master_rotation_indices)
row = hb_min (row, *master_rotation_indices);
if (extremum_translation_indices)
row = hb_min (row, extremum_translation_indices->row);
if (extremum_rotation_indices)
row = hb_min (row, extremum_rotation_indices->row);
if (row == transforms.length)
break;
hb_transform_t transform;
auto master_translation_delta = Null(TranslationDelta);