backend/drm: Report ZERO_COPY hint when direct scanning a client dmabuf.

Since wlr_client_buffer is gone, we are now dealing with client dmabufs
directly.
This commit is contained in:
Alexander Orzechowski 2022-06-24 23:31:20 -04:00
parent ba8230b00a
commit 45ad3d47ad
3 changed files with 13 additions and 1 deletions

View file

@ -16,6 +16,7 @@
#include <wlr/backend/interface.h>
#include <wlr/interfaces/wlr_output.h>
#include <wlr/render/wlr_renderer.h>
#include <wlr/types/wlr_linux_dmabuf_v1.h>
#include <wlr/types/wlr_matrix.h>
#include <wlr/util/box.h>
#include <wlr/util/log.h>
@ -1508,7 +1509,8 @@ static void handle_page_flip(int fd, unsigned seq,
* data between the GPUs, even if we were using the direct scanout
* interface.
*/
if (!drm->parent && plane->current_fb && false) {
if (!drm->parent && plane->current_fb &&
wlr_dmabuf_v1_buffer_is_buffer(plane->current_fb->wlr_buf)) {
present_flags |= WLR_OUTPUT_PRESENT_ZERO_COPY;
}