From 25ce458281facca6a8945a556ba2f9a81a1a6992 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Fri, 7 May 2021 14:34:24 +0200 Subject: [PATCH] =?UTF-8?q?box-drawing:=20don=E2=80=99t=20inline=20=5Fthic?= =?UTF-8?q?kness()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It results in quite a lot of floating point instructions being emitted in almost every box drawing function we have... --- box-drawing.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/box-drawing.c b/box-drawing.c index 87f6fdb5..ae152d9b 100644 --- a/box-drawing.c +++ b/box-drawing.c @@ -54,7 +54,7 @@ change_buffer_format(struct buf *buf, pixman_format_code_t new_format) buf->stride = stride; } -static int +static int NOINLINE _thickness(struct buf *buf, enum thickness thick) { return max((int)(buf->base_thickness * buf->dpi / 72.0 * buf->cell_size), 1) * thick;