box-drawing: don’t inline _thickness()

It results in quite a lot of floating point instructions being emitted
in almost every box drawing function we have...
This commit is contained in:
Daniel Eklöf 2021-05-07 14:34:24 +02:00
parent b48414e72c
commit 25ce458281
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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;