aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-06-27 10:50:39 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-06-27 10:50:39 +0000
commitd9b7a8572294f0bf950ef4944e2fc68edb1b5446 (patch)
tree9d4a4b55f2b040b1fecd609707d3af757bf5f4ce
parentsixel: add sixel_split_by_rectangle() (diff)
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.
-rw-r--r--sixel.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sixel.c b/sixel.c
index 8869e46f..f04a8d7e 100644
--- a/sixel.c
+++ b/sixel.c
@@ -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);
}
}