summaryrefslogtreecommitdiff
path: root/src/entry_backend/harfbuzz.h
diff options
context:
space:
mode:
authorPhil Jones <philj56@gmail.com>2022-06-10 00:24:54 +0100
committerPhil Jones <philj56@gmail.com>2022-06-10 00:24:54 +0100
commit72d98fd99f350d2592c63ee6e1ac28cd38fbcb93 (patch)
tree106873ab06b2dff56563e2b77a24d437b7db6ff1 /src/entry_backend/harfbuzz.h
parent34037743f70c6c5e2b8f916d992e70d42ca07b9b (diff)
Avoid an unnecessary copy of the image buffer.
By pointing Cairo at the mmap-ed file used to create wl_shm buffers, we can eliminate a memcpy() on every draw, providing a decent speedup (especially for large window sizes). This comes at the expense of having to keep track of two Cairo contexts, one for each of our two buffers used for double buffering. Additionally, a single memcpy() is still required for initialisation of the second buffer, so the startup latency isn't affected much.
Diffstat (limited to 'src/entry_backend/harfbuzz.h')
-rw-r--r--src/entry_backend/harfbuzz.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/entry_backend/harfbuzz.h b/src/entry_backend/harfbuzz.h
index 0b07538..52116a8 100644
--- a/src/entry_backend/harfbuzz.h
+++ b/src/entry_backend/harfbuzz.h
@@ -19,7 +19,7 @@ struct entry_backend {
hb_buffer_t *hb_buffer;
};
-void entry_backend_init(struct entry *entry, uint32_t width, uint32_t height, uint32_t scale);
+void entry_backend_init(struct entry *entry, uint32_t *width, uint32_t *height, uint32_t scale);
void entry_backend_destroy(struct entry *entry);
void entry_backend_update(struct entry *entry);