Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Commit

Permalink
backend/drm: use wlr_texture_from_buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
emersion committed May 12, 2021
1 parent 4feb90b commit e84e964
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions backend/drm/renderer.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "render/pixel_format.h"
#include "render/swapchain.h"
#include "render/wlr_renderer.h"
#include "render/wlr_texture.h"

bool init_drm_renderer(struct wlr_drm_backend *drm,
struct wlr_drm_renderer *renderer) {
Expand Down Expand Up @@ -135,12 +136,7 @@ static struct wlr_buffer *drm_surface_blit(struct wlr_drm_surface *surf,
return NULL;
}

struct wlr_dmabuf_attributes attribs = {0};
if (!wlr_buffer_get_dmabuf(buffer, &attribs)) {
return NULL;
}

struct wlr_texture *tex = wlr_texture_from_dmabuf(renderer, &attribs);
struct wlr_texture *tex = wlr_texture_from_buffer(renderer, buffer);
if (tex == NULL) {
return NULL;
}
Expand Down

0 comments on commit e84e964

Please sign in to comment.