Skip to content

Commit

Permalink
fix for file descriptor-backed buffers with stride > width
Browse files Browse the repository at this point in the history
  • Loading branch information
twaik committed Feb 10, 2025
1 parent 972b648 commit 641a4a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/main/cpp/lorie/InitOutput.c
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ static PixmapPtr loriePixmapFromFds(ScreenPtr screen, CARD8 num_fds, const int *
priv->imported = true;

if (modifier == DRM_FORMAT_MOD_INVALID || modifier == RAW_MMAPPABLE_FD) {
check(!(priv->buffer = LorieBuffer_wrapFileDescriptor(width, height, AHARDWAREBUFFER_FORMAT_B8G8R8A8_UNORM, fds[0], offsets[0])), "DRI3: LorieBuffer_wrapAHardwareBuffer failed.");
check(!(priv->buffer = LorieBuffer_wrapFileDescriptor(max(width, strides[0] / 4), height, AHARDWAREBUFFER_FORMAT_B8G8R8A8_UNORM, fds[0], offsets[0])), "DRI3: LorieBuffer_wrapAHardwareBuffer failed.");
screen->ModifyPixmapHeader(pixmap, width, height, 0, 0, strides[0], NULL);
return pixmap;
}
Expand Down

0 comments on commit 641a4a3

Please sign in to comment.