sixel: split: push front instead of back

This reduces the burden on sixel_split_by_rectangle(), which would
otherwise consider the newly added/splitted sixels. Since we already
know they aren't covered by the specified rectangle, we can skip that.
This commit is contained in:
Daniel Eklöf 2020-06-27 12:50:39 +02:00
parent dfc205e706
commit d9b7a85722
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -197,7 +197,7 @@ sixel_split(struct terminal *term, struct sixel *six,
PIXMAN_a8r8g8b8,
above.width, above.height,
above.data, above.width * sizeof(uint32_t));
tll_push_back(term->grid->sixel_images, above);
tll_push_front(term->grid->sixel_images, above);
}
if (rel_below < six->rows) {
@ -219,7 +219,7 @@ sixel_split(struct terminal *term, struct sixel *six,
PIXMAN_a8r8g8b8,
below.width, below.height,
below.data, below.width * sizeof(uint32_t));
tll_push_back(term->grid->sixel_images, below);
tll_push_front(term->grid->sixel_images, below);
}
if (rel_left > 0) {
@ -242,7 +242,7 @@ sixel_split(struct terminal *term, struct sixel *six,
PIXMAN_a8r8g8b8,
left.width, left.height,
left.data, left.width * sizeof(uint32_t));
tll_push_back(term->grid->sixel_images, left);
tll_push_front(term->grid->sixel_images, left);
}
if (rel_right < six->cols) {
@ -265,7 +265,7 @@ sixel_split(struct terminal *term, struct sixel *six,
PIXMAN_a8r8g8b8,
right.width, right.height,
right.data, right.width * sizeof(uint32_t));
tll_push_back(term->grid->sixel_images, right);
tll_push_front(term->grid->sixel_images, right);
}
}