mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-14 05:05:59 +01:00
shm: align size to stride (#7383)
calculate the size to the stride we got to better align it.
This commit is contained in:
parent
b2a18aa80a
commit
1006663b6e
1 changed files with 1 additions and 1 deletions
|
@ -63,7 +63,7 @@ Aquamarine::SSHMAttrs CWLSHMBuffer::shm() {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::tuple<uint8_t*, uint32_t, size_t> CWLSHMBuffer::beginDataPtr(uint32_t flags) {
|
std::tuple<uint8_t*, uint32_t, size_t> CWLSHMBuffer::beginDataPtr(uint32_t flags) {
|
||||||
return {(uint8_t*)pool->data + offset, fmt, size.x * size.y * 4};
|
return {(uint8_t*)pool->data + offset, fmt, stride * size.y};
|
||||||
}
|
}
|
||||||
|
|
||||||
void CWLSHMBuffer::endDataPtr() {
|
void CWLSHMBuffer::endDataPtr() {
|
||||||
|
|
Loading…
Reference in a new issue