-
Notifications
You must be signed in to change notification settings - Fork 342
Conversation
441046f
to
fdfa62b
Compare
8b71061
to
735a9dd
Compare
Can we import the doc-comments from the original issue #2861? |
735a9dd
to
c97a484
Compare
backend/x11/backend.c
Outdated
close(drm_fd); | ||
goto error_event; | ||
} | ||
x11->allocator = &gbm_alloc->base; | ||
pixmap_formats = &x11->dri3_formats; | ||
} else if (x11->have_shm) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can now support both DRI3 and SHM at the same time, so this can be an if
instead of an else if
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we should store both pixman formats then right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh. Hm that won't work too well. We must use the dri3_formats
if the allocator is GBM, shm_formats
if the allocator is shm. However we don't know whether we'll use GBM or shm prior to wlr_allocator_autocreate
. Potential solutions:
- Support either DMA-BUFs or shm, not both at the same time. But this will break if DMA-BUFs are available (disabling shm) and the user forces the Pixman renderer (via
WLR_RENDERER=pixman
). - Check the type of the allocator returned by
wlr_allocator_autocreate
, with new functions likeallocator_is_gbm
andallocator_is_shm
. - Do something more involved like
allocator_get_buffer_caps
then check the result to decide which formats to select, but let's keep this for later (if ever), it's over-complicated when there are no third-party allocators.
Also needs a rebase :) |
c97a484
to
fcc90a7
Compare
fcc90a7
to
58bf057
Compare
58bf057
to
cec1529
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Implements #2861