forked from external/yambar
bar/wayland: use cairo_format_stride_for_width() to calculate stride
This commit is contained in:
parent
cf680573c2
commit
6030ef5298
1 changed files with 2 additions and 1 deletions
|
@ -466,7 +466,8 @@ get_buffer(struct wayland_backend *backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Total size */
|
/* Total size */
|
||||||
uint32_t stride = backend->width * 4;
|
const uint32_t stride = cairo_format_stride_for_width(
|
||||||
|
CAIRO_FORMAT_ARGB32, backend->width);
|
||||||
size = stride * backend->height;
|
size = stride * backend->height;
|
||||||
ftruncate(pool_fd, size);
|
ftruncate(pool_fd, size);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue