mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-20 05:33:47 -04:00
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:
parent
dfc205e706
commit
d9b7a85722
1 changed files with 4 additions and 4 deletions
8
sixel.c
8
sixel.c
|
|
@ -197,7 +197,7 @@ sixel_split(struct terminal *term, struct sixel *six,
|
||||||
PIXMAN_a8r8g8b8,
|
PIXMAN_a8r8g8b8,
|
||||||
above.width, above.height,
|
above.width, above.height,
|
||||||
above.data, above.width * sizeof(uint32_t));
|
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) {
|
if (rel_below < six->rows) {
|
||||||
|
|
@ -219,7 +219,7 @@ sixel_split(struct terminal *term, struct sixel *six,
|
||||||
PIXMAN_a8r8g8b8,
|
PIXMAN_a8r8g8b8,
|
||||||
below.width, below.height,
|
below.width, below.height,
|
||||||
below.data, below.width * sizeof(uint32_t));
|
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) {
|
if (rel_left > 0) {
|
||||||
|
|
@ -242,7 +242,7 @@ sixel_split(struct terminal *term, struct sixel *six,
|
||||||
PIXMAN_a8r8g8b8,
|
PIXMAN_a8r8g8b8,
|
||||||
left.width, left.height,
|
left.width, left.height,
|
||||||
left.data, left.width * sizeof(uint32_t));
|
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) {
|
if (rel_right < six->cols) {
|
||||||
|
|
@ -265,7 +265,7 @@ sixel_split(struct terminal *term, struct sixel *six,
|
||||||
PIXMAN_a8r8g8b8,
|
PIXMAN_a8r8g8b8,
|
||||||
right.width, right.height,
|
right.width, right.height,
|
||||||
right.data, right.width * sizeof(uint32_t));
|
right.data, right.width * sizeof(uint32_t));
|
||||||
tll_push_back(term->grid->sixel_images, right);
|
tll_push_front(term->grid->sixel_images, right);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue